A full-fledged calendar booking application similar to Calendly, built with FastAPI, React, and PostgreSQL.
- User Authentication: JWT-based authentication system
- Calendar Management: Users can set their availability and manage calendar settings
- Booking System: Public booking interface for scheduling appointments
- Admin Dashboard: Comprehensive dashboard for managing bookings and users
- API Documentation: Complete Swagger/OpenAPI documentation
- Production Ready: Docker containers for both development and production
- FastAPI: Modern Python web framework
- SQLAlchemy: ORM for database operations
- PostgreSQL: Primary database
- JWT: Authentication tokens
- Pydantic: Data validation
- Alembic: Database migrations
- React: User interface framework
- TypeScript: Type safety
- Tailwind CSS: Styling
- React Router: Navigation
- Axios: HTTP client
- Docker: Containerization
- Docker Compose: Multi-container orchestration
- Nginx: Reverse proxy (production)
# Start development environment
docker-compose -f docker-compose.dev.yml up --build
# Access the application
# Frontend: http://localhost:3000
# Backend API: http://localhost:8000
# API Docs: http://localhost:8000/docs# Start production environment
docker-compose -f docker-compose.prod.yml up --build
# Access the application
# Frontend: http://localhost
# Backend API: http://localhost/api
# API Docs: http://localhost/api/docsOn first startup, the application automatically creates a default admin user:
- Email:
admin@bcal.com - Password:
admin123
BCal/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── api/ # API routes
│ │ ├── core/ # Core configurations
│ │ ├── models/ # Database models
│ │ ├── schemas/ # Pydantic schemas
│ │ └── services/ # Business logic
│ ├── alembic/ # Database migrations
│ └── requirements.txt # Python dependencies
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ └── types/ # TypeScript types
│ └── package.json # Node dependencies
├── docker-compose.dev.yml # Development environment
├── docker-compose.prod.yml # Production environment
└── CHANGELOG.md # Development changelog
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/refresh- Refresh JWT token
GET /api/users/me- Get current user profilePUT /api/users/me- Update user profileGET /api/users/{user_id}/availability- Get user availability
GET /api/calendar/availability- Get available time slotsPOST /api/calendar/availability- Set availabilityDELETE /api/calendar/availability/{id}- Remove availability
POST /api/bookings- Create a bookingGET /api/bookings- Get user's bookingsGET /api/bookings/{id}- Get specific bookingPUT /api/bookings/{id}- Update bookingDELETE /api/bookings/{id}- Cancel booking
GET /api/admin/bookings- Get all bookings (admin only)GET /api/admin/users- Get all users (admin only)GET /api/admin/dashboard- Get dashboard stats (admin only)
DATABASE_URL: PostgreSQL connection stringSECRET_KEY: JWT secret keyALGORITHM: JWT algorithm (default: HS256)ACCESS_TOKEN_EXPIRE_MINUTES: Token expiration time
REACT_APP_API_URL: Backend API URL
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License