Full Stack Package
The Full Stack Package provides everything you need for a complete web application: Next.js frontend, NestJS backend, and admin dashboard.
What's Included
Full Stack Package
├── Frontend Package ✅
│ ├── Next.js 16 application
│ ├── Authentication UI
│ ├── User dashboard
│ ├── Security settings
│ └── AI Components (AIChatInterface, useAIChat hook)
│
├── Backend Package ✅
│ ├── NestJS API server
│ ├── PostgreSQL database
│ ├── Redis caching
│ ├── Email service
│ └── AI Module (Anthropic, OpenAI, Gemini, Groq)
│
└── Admin Module ✅
├── User management
├── Session control
├── Audit logging
└── Analytics
Quick Start
Automated Setup
# Clone and set up full stack
git clone #.git
cd fss
# Run full stack setup
cd projects/fss
./setup.sh fullstack
Manual Setup
# Backend setup
cd projects/fss/backend
npm install
cp .env.example .env
npx prisma migrate dev
npm run start:dev
# Frontend setup (new terminal)
cd projects/fss/frontend
npm install
cp .env.example .env.local
npm run dev
Architecture
ASCII Architecture
┌─────────────────────────────────────────────────────┐
│ Frontend (Next.js) │
│ ┌─────────────────────────────────────────────┐ │
│ │ React Components │ Pages │ API Routes │ │
│ └─────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────┐ │
│ │ Authentication │ State Management │ UI Kit │ │
│ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘
│
│ HTTPS
▼
┌─────────────────────────────────────────────────────┐
│ Backend (NestJS) │
│ ┌──────────┬──────────┬──────────┬──────────┐ │
│ │ Auth │ User │ Admin │ Email │ Health │ │
│ └──────────┴──────────┴──────────┴──────────┘ │
│ │ │
│ ┌─────────┴─────────┐ │
│ ▼ ▼ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ PostgreSQL │ │ Redis │ │
│ │ Database │ │ Cache │ │
│ └─────────────────┘ └─────────────────┘ │
└─────────────────────────────────────────────────────┘
Features
Frontend Features
- 🚀 Next.js 16 with App Router
- 🔐 Complete Authentication (Login, Register, MFA)
- 📊 User Dashboard with analytics
- 👥 Profile Management
- 🛡️ Security Settings
- 📱 Responsive Design
- 🤖 AI Components (
AIChatInterface,AIProviderSelector,useAIChathook)
Backend Features
- 🏗️ NestJS 11 modular architecture
- 🔑 JWT Authentication with refresh tokens
- 📧 Email Service with templates
- 📊 Audit Logging
- 🏥 Health Checks
- 🚦 Rate Limiting
- 🤖 AI Module — Anthropic, OpenAI, Gemini, Groq with SSE streaming
Admin Features
- 👤 User Management
- 🔐 Session Control
- 📋 Audit Logs
- 📧 Email Logs
- 👑 User Impersonation
Environment Setup
Backend (.env)
DATABASE_URL="postgresql://user:pass@localhost:5432/fss"
REDIS_HOST="localhost"
REDIS_PORT=6379
JWT_SECRET="your-jwt-secret"
JWT_REFRESH_SECRET="your-refresh-secret"
SMTP_HOST="smtp.example.com"
SMTP_USER="your-email"
SMTP_PASSWORD="your-password"
Frontend (.env.local)
NEXT_PUBLIC_API_URL="https://localhost:3443"
NEXT_PUBLIC_APP_URL="http://localhost:3000"
Development
Running Locally
# Start backend
cd projects/fss/backend
npm run start:dev
# Start frontend (new terminal)
cd projects/fss/frontend
npm run dev
# Access
# Frontend: http://localhost:3000
# Backend: https://localhost:3443
# API Docs: https://localhost:3443/api
Docker Development
# Start all services with Docker
docker-compose up -d
# View logs
docker-compose logs -f
Production Deployment
Docker Production
# Build production images
docker-compose -f docker-compose.prod.yml build
# Deploy
docker-compose -f docker-compose.prod.yml up -d
Manual Production
# Backend
cd projects/fss/backend
npm run build
npm run start:prod
# Frontend
cd projects/fss/frontend
npm run build
npm run start
Environment Setup
AI Provider Keys (Optional)
Add any or all of these to projects/fss/backend/.env to activate AI features:
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
GOOGLE_AI_API_KEY=AIza...
GROQ_API_KEY=gsk_...
Providers without a key are automatically disabled — no errors, no config changes needed.
Next Steps
- Quick Start Guide - Get started quickly
- Backend Package - Backend details
- Frontend Package - Frontend details
- Admin Module - Admin features
- AI Integrations - AI setup and usage
- Vibe Templates - Scaffold features with AI
- Deployment Guide - Production deployment