A gym membership management system with Django backend and Vue.js frontend.
- Django REST API: Manage gym member data (CRUD operations).
- Vue.js Frontend: Responsive member list with Bootstrap 5 styling.
- CORS Configuration: Pre-configured for cross-origin requests.
- Backend: Django 3.0+, Django REST Framework
- Frontend: Vue.js 3, Axios, Bootstrap 5
- Tools: npm, django-cors-headers
- Python ≥3.6, Node.js ≥12, npm/yarn
git clone https://github.com/Abdullah-Niaz/gym-website.git
cd gym-websitepython -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
pip install -r backend/requirements.txt
INSTALLED_APPS = [
...
'corsheaders',
]
MIDDLEWARE = [
...
'corsheaders.middleware.CorsMiddleware',
]
CORS_ALLOWED_ORIGINS = [
"http://localhost:8080",
]
cd backend
python manage.py migrate
Run server (http://localhost:8000)
python manage.py runserver
cd frontend npm install
Start development server (http://localhost:8080)
npm run serve
- GET /api/members/: List all members
- POST /api/members/: Add new member
- GET /api/members//: Member details
gym-website/
├── backend/ # Django project
│ ├── gymapp/ # Members app
│ │ ├── models.py # Member model
│ │ └── api/ # DRF views and serializers
├── frontend/ # Vue.js project
│ └── src/
│ ├── components/ # Vue components
│ └── App.vue # Main component
