A comprehensive full-stack application for tracking and analyzing trade performance, managing stock portfolios, and monitoring transaction histories.
- User Authentication: Secure Login and Registration system using JWT.
- Interactive Dashboard: Overview of account balance and portfolio allocation with visual charts (Recharts).
- Transaction Management: Record buy/sell actions with detailed, paginated history (including fee by percentage input).
- Stock Positions: Track current holdings and live performance with auto-updating market prices.
- Trade Results: Generate and share comprehensive trade result (PnL & ROI) report cards.
- Journals & Notes: Personal note page with image and long-text support.
- Financial Tracker: Manage and track personal financial activities through a dedicated dashboard with mobile-responsive consolidated views.
- Profile Management: Manage user settings and adjust balance sheets dynamically.
- AI Assistant: Built-in assistant to help analyze trading patterns and offer insights. (Coming soon)
- Language: Go 1.25+
- Framework: Fiber v3
- Database ORM: GORM
- Database: PostgreSQL
- Security: Argon2id for password hashing, Validator for struct validation
- Architecture: Domain-Driven Design / Clean Architecture (
delivery,domain,repository,services)
- Framework: Next.js 16 (App Router)
- Library: React 19
- Styling: Tailwind CSS v4
- UI Components: shadcn/ui (Radix UI), Lucide Icons
- Data Fetching: Axios
- Charts: Recharts
- Package Manager: pnpm
Trade-Performance-Tracker/
βββ backend/ # Go API Server
β βββ cmd/ # Entry point for the application (main.go)
β β βββ api/ # Where main.go located
β βββ internal/ # Application code (Clean Architecture)
β β βββ config/ # Configuration loaders
β β βββ delivery/ # HTTP handlers and routing
β β βββ domain/ # Core interfaces and entities
β β βββ repository/ # Database interactions
β β βββ services/ # Business logic
β βββ pkg/ # Shared utilities and helpers
β βββ .dockerignore # Ignored files (Docker)
β βββ .env.example # Example environment variables
β βββ .gitignore # Ignored files (Git)
β βββ go.mod # Go module dependencies
β βββ go.sum # Another Go file
β βββ README.md # README
βββ frontend/ # Next.js Application
β βββ app/ # App Router pages and layouts
β β βββ (account)/ # Auth pages (login, register)
β β βββ admin/ # Dashboard, Profile, Stocks, Transactions, Assistant, Tracker, Calculator, Journals
β β βββ components/ # Shared & Local Page UI Components (for pages, etc.)
β βββ components/ # Reusable UI components (shadcn, charts, etc.)
β βββ hooks/ # Custom React hooks for API and state management
β βββ lib/ # Utility functions
β βββ types/ # TypeScript interface definitions
β βββ .env.example # Example environment variables for frontend
β βββ Dockerfile # Docker instructions for frontend deployment
β βββ eslint.config.mjs # Linting rules and code style configuration
β βββ next.env-d.ts # TypeScript definitions for Next.js
β βββ next.config.ts # Next.js specific configuration
β βββ package.json # Node dependencies
β βββ pnpm-lock.yaml # pnpm lockfile
β βββ pnpm-workspace.yaml # Monorepo workspace configuration for pnpm
β βββ postcss.config.mjs # Tailwind CSS and PostCSS configuration
β βββ proxy.ts # Local development proxy settings
β βββ README.md # README
β βββ tsconfig.json # TypeScript compiler configuration
βββ .gitignore # Ignored files for the entire workspace (Git)
βββ backup-trade-tracker.sql # Database snapshot or backup file
βββ CHANGELOG.md # Record of all notable changes to the project
βββ docker-compose.yml # Docker orchestration for local development
βββ README.md # Main project documentation
βββ vercel.json # Vercel config file
- Go (1.25 or higher)
- Node.js (20 or higher)
- pnpm (Preferred package manager)
- PostgreSQL (Main database)
- Cloudinary (Media management for image uploads and CDN.)
- Vercel (Managed PostgreSQL & Connection Pooling.)
- Supabase (Managed PostgreSQL & Connection Pooling, use this if you're going to online)
- Navigate to the backend directory:
cd backend - Set up environment variables:
Edit
cp .env.example .env
.envto match your PostgreSQL database credentials. - Install dependencies:
go mod tidy
- Run migrations:
go run core/script/auto-migrate.go
- Run the Go server:
The API will start on the configured port (default is usually :3000 or :8080).
go run cmd/api/main.go
- Open a new terminal and navigate to the frontend directory:
cd frontend - Install dependencies via pnpm:
pnpm install
- Set up environment variables (if required for API endpoint URLs):
# Create a .env.local if you need to override the default API URL (Schemas can be obtained from .env.example) - Start the Next.js development server:
The frontend will be available at http://localhost:3000.
pnpm run dev
Copy the .env.example file to .env in both /frontend and /backend directories, then fill in the following variables:
| Variable | Description | How to Obtain |
|---|---|---|
NEXT_PUBLIC_API_URL |
Your Go Backend URL | Usually http://localhost:8080 for local or your Vercel deployment URL. Default: {url}/api |
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME |
Cloudinary Cloud Name | Get it from Cloudinary Dashboard after sign up. |
| Variable | Description | How to Obtain |
|---|---|---|
DB_CONNECTION |
PostgreSQL Connection String | See Database Setup Guide |
PORT |
Server Port | Default: 8080. |
JWT_SECRET |
Secret key for JWT signing | Create a random secure string (e.g., using openssl rand -base64 32). |
PRODUCTION_MODE |
App environment state | Set to false for local dev, true for production/Vercel. |
API_GROUP_NAME |
Fiber route prefix | Default: /api. |
-
Cloud: Go to Supabase > Connect > Transaction Pooler. Use Port 6543. For more information, see images below.
-
Local: Use your local PostgreSQL URI (e.g., postgres://user:pass@localhost:5432/db)
For comprehensive production deployment instructions on Vercel, including our seamless "Zero-Config" True Monorepo setup, please refer to the Deployment Guide.
This project is licensed under the MIT License.