A RESTful API built with Django and Django REST Framework for managing appointment bookings.
- User authentication and authorization
- Create, read, update, and delete appointments
- Manage availability schedules
- Search and filter appointments
- Python 3.8+
- Django 4.0
- Django REST Framework 3.14.0
-
Clone the repository:
git clone <repository-url> cd booking-appointment-api -
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Apply migrations:
python manage.py migrate -
Create a superuser (admin):
python manage.py createsuperuser -
Run the development server:
python manage.py runserver
POST /api/token/- Obtain JWT tokenPOST /api/token/refresh/- Refresh JWT token
GET /api/users/- List usersPOST /api/users/- Create userGET /api/users/{id}/- Get user detailsPUT /api/users/{id}/- Update userDELETE /api/users/{id}/- Delete user
GET /api/appointments/- List appointmentsPOST /api/appointments/- Create appointmentGET /api/appointments/{id}/- Get appointment detailsPUT /api/appointments/{id}/- Update appointmentDELETE /api/appointments/{id}/- Delete appointment
You can configure the application by creating a .env file in the project root with the following variables:
DEBUG=True
SECRET_KEY=your-secret-key
DATABASE_URL=sqlite:///db.sqlite3
Run tests with:
python manage.py test
This project is licensed under the MIT License - see the LICENSE file for details.