A modern full-stack application built with Next.js frontend and Python FastAPI backend, featuring JWT authentication, user management, and a comprehensive dashboard.
- Next.js 15 - React framework with App Router
- Tailwind CSS - Utility-first CSS framework
- TypeScript - Type-safe JavaScript
- Lucide React - Beautiful icons
- Axios - HTTP client for API requests
- js-cookie - Cookie management
- Python FastAPI - Modern, fast web framework
- SQLAlchemy - Python SQL toolkit and ORM
- JWT Authentication - Secure token-based authentication
- Pydantic - Data validation using Python type annotations
- Uvicorn - ASGI server implementation
- UV - Python package management
- SQLite - Development database
- MySQL - Production database (configurable)
✅ Landing Page - Accessible without login ✅ User Authentication - JWT-based login/register system ✅ User Management - Complete user database with profiles ✅ Protected Dashboard - Authenticated user panel ✅ Sidebar Navigation - Clean navigation interface ✅ App Collection - Dashboard with various application modules ✅ Statistics Dashboard - Real-time stats and analytics ✅ Responsive Design - Mobile-friendly interface
next-python/
├── backend/
│ ├── app/
│ │ ├── routers/
│ │ │ ├── auth.py # Authentication endpoints
│ │ │ ├── users.py # User management
│ │ │ └── dashboard.py # Dashboard data
│ │ ├── main.py # FastAPI application
│ │ ├── database.py # Database models
│ │ ├── schemas.py # Pydantic schemas
│ │ └── auth.py # Authentication utilities
│ ├── pyproject.toml # Python dependencies (uv)
│ ├── .env # Environment variables
│ └── run.py # Development server
├── frontend/
│ ├── src/
│ │ ├── app/
│ │ │ ├── login/ # Login page
│ │ │ ├── register/ # Registration page
│ │ │ ├── dashboard/ # Dashboard page
│ │ │ ├── layout.tsx # Root layout
│ │ │ ├── page.tsx # Landing page
│ │ │ └── globals.css # Global styles
│ │ ├── components/
│ │ │ ├── Sidebar.tsx # Navigation sidebar
│ │ │ ├── AppGrid.tsx # App cards grid
│ │ │ └── StatsGrid.tsx # Statistics display
│ │ └── contexts/
│ │ └── AuthContext.tsx # Authentication context
│ ├── package.json # Node.js dependencies
│ ├── tailwind.config.js # Tailwind configuration
│ └── next.config.js # Next.js configuration
└── README.md- Python 3.8+
- Node.js 18+
- UV (Python package manager)
-
Navigate to backend directory:
cd backend -
Install dependencies with UV:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv sync
-
Set up environment variables:
cp .env.example .env # Edit .env with your configuration -
Create database:
python create_database.py
-
Start the backend server:
python run.py # or uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
The backend will be available at http://localhost:8000
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install # or yarn install -
Set up environment variables:
cp .env.local.example .env.local # Edit .env.local with your API URL -
Start the development server:
npm run dev # or yarn dev
The frontend will be available at http://localhost:3000
POST /auth/register- Register new userPOST /auth/login- User loginGET /auth/me- Get current user info
GET /users/- Get all users (authenticated)GET /users/{user_id}- Get specific user (authenticated)
GET /dashboard/apps- Get dashboard applicationsGET /dashboard/stats- Get dashboard statistics
SECRET_KEY=your-secret-key-here
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
DATABASE_URL=sqlite:///./test.db
CORS_ORIGINS=["http://localhost:3000"]NEXT_PUBLIC_API_URL=http://localhost:8000The application uses SQLite by default for development. The database will be created automatically when you run the application.
For production, update your .env file:
DATABASE_URL=mysql://username:password@localhost/dbnameThen run the database creation script:
python create_database.py- Pricing page with three tiers
- Stripe payment integration
- Additional dashboard modules
- Email notifications
- Advanced analytics
- User roles and permissions
- Backend: Add new routers in
app/routers/ - Frontend: Create new pages in
src/app/ - Components: Add reusable components in
src/components/
# Backend
cd backend
pytest
# Frontend
cd frontend
npm test- Set up production environment variables
- Configure MySQL database
- Deploy using Docker, Railway, or similar platform
- Build the application:
npm run build - Deploy to Vercel, Netlify, or similar platform
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.