A complete system for managing calisthenics competitions with a FastAPI backend and React frontend.
cali/
├── backend/ # FastAPI backend
│ ├── app/ # Application code
│ │ ├── activity/ # Activity endpoints
│ │ ├── events/ # Events endpoints
│ │ └── participants/ # Participants endpoints
│ └── utils/ # Database utilities
└── frontend/ # React + Vite frontend
└── src/ # Source code
├── api/ # API integration
└── components/ # React components
- Navigate to backend directory:
cd backend- Create virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt- Set up environment variables:
export DB_HOST=localhost
export DB_PORT=5432
export DB_NAME=calisthenics_db
export DB_USERNAME=postgres
export DB_PASSWORD=your_password- Start the server:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000The API will be available at http://localhost:8000
API docs: http://localhost:8000/docs
- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm run devThe frontend will be available at http://localhost:5173
Create a .env file in the frontend directory:
VITE_API_URL=http://localhost:8000
- List View: See all registered participants with search functionality
- Detail View: View participant profile with complete activity history
- Create Participant: Register new participants and assign them to events
- Activity Tracking: View all activities across all events for a participant
- List View: Browse all competition events by type
- Event Detail: See all participants registered for an event
- Participant Activities: View and manage activities for each participant
- Add/Edit Activity: Record new attempts with time, weight, reps, and success status
GET /participants/get- List all participantsGET /participants/get/{id}- Get participant by IDPOST /participants/create- Create new participantPUT /participants/update/{id}- Update participant
GET /events/get- List all eventsGET /events/get/{id}- Get event by IDPOST /events/create- Create new event
POST /activity/get_metrics/event_id/{event_id}?participant_id={id}- Get activitiesPOST /activity/add_activity/- Add new activity
{
"name": "string",
"age": 25,
"gender": "Male",
"weight": 70.5,
"phone": "+1234567890",
"country": "India",
"state": "Maharashtra",
"event_id": [1, 2]
}{
"name": "Front Lever Hold",
"description": "Hold position for maximum time",
"event_type": 3
}Event types are integers referencing the event_type table. Available types: ENDURANCE, STREET_LIFTING, MAX_HOLDS, MAX_REPS
{
"event_id": 1,
"participant_id": 1,
"attempt_id": 1,
"weight": 20.0,
"type_of_activity": "PULL_UP",
"reps": 10,
"time": 60.5,
"is_success": true,
"is_deleted": false
}Activity types: PULL_UP, DIPS, SQUAT, MUSCLE_UP, PUSH_UP
- FastAPI - Modern Python web framework
- SQLAlchemy - Database ORM
- PostgreSQL - Database
- Pydantic - Data validation
- React 19 - UI library
- Vite - Build tool
- Tailwind CSS v4 - Styling
- Axios - HTTP client
- Lucide React - Icons
- CORS is enabled for all origins in development (configure for production)
- The frontend expects the API at
http://localhost:8000by default - Activity metrics returned vary based on event type
Built for athletes, by athletes 💪