A production-quality full-stack portfolio management system built with Next.js and FastAPI in a monorepo architecture.
- Web (
apps/web): Next.js 14 frontend with TypeScript, Tailwind CSS, and i18n - API (
apps/api): FastAPI backend with PostgreSQL, JWT auth, and RBAC
- Node.js 18+
- Python 3.13+
- Docker & Docker Compose (for PostgreSQL)
-
Install dependencies:
npm install
-
Setup API:
cd apps/api python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt docker-compose up -d alembic upgrade head PYTHONPATH=. python scripts/seed_admin.py cd ../..
-
Configure environment:
cp apps/web/.env.example apps/web/.env.local cp apps/api/.env.example apps/api/.env
Update
apps/api/.envwith your database credentials and JWT secret if needed. -
Start development servers:
npm run dev
This will start both frontend (http://localhost:3000) and backend (http://127.0.0.1:8000).
npm run dev- Start both web and API in parallelnpm run dev:web- Start only frontendnpm run dev:api- Start only APInpm run build- Build all projectsnpm run test- Run all testsnpm run test:web- Run frontend tests onlynpm run test:api- Run API tests onlynpm run lint- Lint all projects
For testing purposes, use these accounts (seeded via scripts/seed_admin.py):
| Role | Password | |
|---|---|---|
| Admin | admin@example.com | admin12345 |
| Editor | editor@example.com | editor12345 |
| Viewer | viewer@example.com | viewer12345 |
- Architecture Overview - System architecture and component interactions
- Development Workflow - Daily development practices and workflows
- Integration Guide - Frontend-backend integration and API contracts
- Contributing Guidelines - Code standards and PR process
- Deployment Guide - Production deployment instructions
- Environment Variables - Complete environment configuration reference
- Troubleshooting - Common issues and solutions
- Web (Frontend) - Next.js application documentation
- API (Backend) - FastAPI application documentation
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- UI Library: React 18
- Styling: Tailwind CSS + shadcn/ui components
- Internationalization: next-intl (English/Japanese)
- Authentication: JWT (Access + Refresh tokens)
- Testing: Vitest (unit) + Playwright (E2E)
- Framework: FastAPI
- Language: Python 3.13
- Database: PostgreSQL
- ORM: SQLAlchemy 2.0
- Migrations: Alembic
- Authentication: JWT (Access + Refresh tokens)
- Password Hashing: Argon2
- Testing: Pytest
- JWT-based authentication with automatic token refresh
- Role-based access control (Admin, Editor, Viewer)
- Multi-tenant organization support
- Project management with CRUD operations
- Tag-based categorization
- Audit logging for sensitive actions
- Full internationalization (English/Japanese)
- Comprehensive test coverage (unit + E2E)
This project is licensed under the MIT License - see the LICENSE file for details.