Professional template for modern web applications with React, FastAPI, Vercel and Supabase
- π― Project Description
- β¨ Key Features
- ποΈ System Architecture
- π οΈ Technology Stack
- π Quick Start
- π Project Structure
- π¨ Design System
- π§ Configuration
- π¦ Deployment
- π§ͺ Testing
- π Documentation
- π€ Contributing
- π License
WebApp Python is an advanced and professional template for modern web application development. Designed to be a robust and scalable starting point, it combines best practices for both frontend and backend development.
- β Rapid Development: Pre-configured setup for immediate development
- β Scalability: Modular and extensible architecture
- β Performance: Optimized for speed and efficiency
- β Security: Implementation of security best practices
- β Maintainability: Clean and well-documented code
- β Automatic Deployment: Complete integration with Vercel
- βοΈ React 18 with TypeScript for robust development
- π¨ Professional Design System with Tailwind CSS
- π± Responsive Design optimized for all devices
- π State Management with React Hooks
- π― Smart Forms with advanced validation
- π Notifications with react-hot-toast
- π Smooth Animations and transitions
- β‘ FastAPI for high-performance APIs
- π Complete JWT Authentication and secure
- π Data Validation with Pydantic
- ποΈ Database with Supabase
- π Automatic Documentation with Swagger/OpenAPI
- π§ͺ Testing with pytest
- βοΈ Vercel for automatic deployment
- π CI/CD integrated
- π Monitoring and analytics
- π SSL/HTTPS automatic
- π Global CDN for better performance
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Database β
β (React) βββββΊβ (FastAPI) βββββΊβ (Supabase) β
β β β β β β
β β’ TypeScript β β β’ Python β β β’ PostgreSQL β
β β’ Tailwind CSS β β β’ JWT Auth β β β’ Real-time β
β β’ Vite β β β’ Pydantic β β β’ Row Level β
β β’ React Router β β β’ CORS β β Security β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
βββββββββββββββββββ
β Vercel β
β (Deployment) β
β β
β β’ Auto Deploy β
β β’ Edge Network β
β β’ Analytics β
βββββββββββββββββββ
Technology | Version | Purpose |
---|---|---|
18.2.0 | UI Framework | |
5.0.0 | Static typing | |
4.4.0 | Build tool | |
3.3.0 | CSS Framework | |
6.8.0 | Routing | |
7.43.0 | Form handling |
Technology | Version | Purpose |
---|---|---|
3.9+ | Main language | |
0.100.0 | Web framework | |
0.23.0 | ASGI server | |
2.0.0 | Data validation | |
2.8.0 | JWT authentication | |
1.0.0 | Environment variables |
Technology | Purpose |
---|---|
Deployment and hosting | |
Database and auth | |
Version control |
- Node.js 18+
- Python 3.9+
- Git
- Vercel account
- Supabase account
git clone https://github.com/godie007/webapp-python.git
cd webapp-python
# Copy example files
cp backend/env.example backend/.env
cp frontend/.env.example frontend/.env
# Configure variables in backend/.env
JWT_SECRET=your_super_secure_jwt_secret
DATABASE_URL=your_supabase_url
# Frontend
cd frontend
npm install
# Backend
cd ../backend
pip install -r requirements.txt
# Terminal 1 - Backend
cd backend
python main.py
# Terminal 2 - Frontend
cd frontend
npm run dev
# From project root
npx vercel --prod
webapp-python/
βββ π frontend/ # React application
β βββ π src/
β β βββ π components/ # Reusable components
β β βββ π services/ # API services
β β βββ π types/ # TypeScript definitions
β β βββ π utils/ # Utilities
β β βββ π main.tsx # Entry point
β βββ π public/ # Static assets
β βββ π package.json # Frontend dependencies
β βββ π vite.config.ts # Vite configuration
β βββ π tailwind.config.js # Tailwind configuration
β βββ π vercel.json # Vercel configuration
βββ π backend/ # FastAPI API
β βββ π app/
β β βββ π models/ # Data models
β β βββ π services/ # Business logic
β β βββ π repositories/ # Data access
β β βββ π utils/ # Utilities
β β βββ π main.py # Main application
β βββ π requirements.txt # Python dependencies
β βββ π main.py # Entry point
βββ π docs/ # Documentation
βββ π vercel.json # Vercel configuration
βββ π README.md # This file
βββ π LICENSE # MIT License
/* Primary Colors */
--primary-50: #eff6ff;
--primary-500: #3b82f6;
--primary-900: #1e3a8a;
/* Secondary Colors */
--secondary-50: #f8fafc;
--secondary-500: #64748b;
--secondary-900: #0f172a;
/* States */
--success: #10b981;
--warning: #f59e0b;
--error: #ef4444;
- Panels:
.panel
,.panel-elevated
,.panel-glass
- Cards:
.card
,.card-elevated
,.card-glass
- Forms:
.form-group
,.form-label
,.form-input
- Buttons:
.btn-primary
,.btn-secondary
,.btn-success
- Badges:
.badge-primary
,.badge-success
,.badge-error
# JWT Configuration
JWT_SECRET=your_super_secure_jwt_secret
JWT_ALGORITHM=HS256
JWT_EXPIRATION=3600
# Database
DATABASE_URL=postgresql://user:password@host:port/database
# CORS
ALLOWED_ORIGINS=http://localhost:5173,https://your-domain.vercel.app
# Environment
ENVIRONMENT=development
DEBUG=true
# API Configuration
VITE_API_BASE_URL=http://localhost:3000/api
VITE_APP_NAME=WebApp Python
# Environment
VITE_ENVIRONMENT=development
-
Connect with GitHub
- Go to Vercel Dashboard
- Import your GitHub repository
- Vercel will automatically detect the configuration
-
Configure Environment Variables
# In Vercel Dashboard > Settings > Environment Variables JWT_SECRET=your_production_jwt_secret DATABASE_URL=your_production_supabase_url
-
Manual Deployment
npx vercel --prod
- Frontend: https://your-app.vercel.app
- API: https://your-app.vercel.app/api
- Documentation: https://your-app.vercel.app/docs
cd frontend
npm run test
npm run test:coverage
cd backend
pytest
pytest --cov=app
npm run test:e2e
- π Developer Guide
- π Deployment Guide
- π¨ Design System
- π οΈ Troubleshooting
- π API Documentation
# Development
npm run dev # Frontend development
python main.py # Backend development
# Build
npm run build # Build frontend
npm run preview # Preview build
# Testing
npm run test # Run tests
npm run test:watch # Watch mode
# Linting
npm run lint # ESLint
npm run lint:fix # Auto-fix
# Type checking
npm run type-check # TypeScript check
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- β TypeScript for all frontend code
- β ESLint + Prettier for formatting
- β Conventional Commits for messages
- β Testing for new features
- β Documentation updated
feat: add user authentication
fix: resolve CORS issue
docs: update API documentation
style: improve button styling
refactor: optimize database queries
test: add unit tests for auth service
This project is licensed under the MIT License. See the LICENSE file for details.
If this template has been helpful, please consider:
β Star this repository β’ π Report issues β’ π‘ Suggest improvements β’ π€ Contribute
Learn more: Subscribe to my YouTube Channel for web development tutorials
Developed with β€οΈ by @godie007