Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dentist

Django REST API project for a dental clinic or стоматology website backend. The project exposes structured endpoints for services, doctors, blog posts, company information, testimonials, appointment booking, and callback requests, with built-in OpenAPI documentation through drf-spectacular.

This repository looks like a practical study project focused on:

  • building a content API with Django REST Framework
  • structuring models, serializers, and class-based API views
  • exposing clinic-related resources such as doctors, services, and locations
  • handling user actions like booking and callback requests
  • generating interactive API documentation

Features

  • Public API endpoints for clinic services
  • Doctor listing with filter support
  • Blog post listing and detail endpoints
  • Company info and company location endpoints
  • Public comments listing endpoint
  • Appointment booking creation endpoint
  • Callback request creation endpoint
  • Swagger and ReDoc documentation pages
  • CORS support for frontend integration

Project Structure

  • core/: Django project configuration and global settings
  • api/: main application with models, serializers, filters, views, routes, and admin registration
  • api/views/: API endpoints for services, posts, doctors, company info, comments, booking, and callback requests
  • api/models/: domain models for clinic content and user requests
  • api/serializers/: DRF serializers for API responses and write operations
  • api/filters/: queryset filter definitions for API endpoints
  • manage.py: Django management entry point

How It Works

  1. Public read endpoints expose content such as services, posts, doctors, and company details.
  2. The doctors endpoint supports filtering through django-filter.
  3. Write endpoints accept booking submissions and callback requests.
  4. API schemas are generated through drf-spectacular.
  5. Swagger UI and ReDoc provide interactive documentation for exploring the API.

Tech Stack

  • Python
  • Django
  • Django REST Framework
  • drf-spectacular
  • django-filter
  • django-cors-headers
  • Pillow
  • SQLite by default

Installation

git clone <repository-url>
cd Dentist
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt

If you are using Windows PowerShell:

.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt

Running Locally

Apply migrations:

python manage.py migrate

Start the development server:

python manage.py runserver

If you want to manage content through Django admin:

python manage.py createsuperuser

API Routes

  • /api/services/: list services
  • /api/services/<id>/: service detail
  • /api/posts/: list posts
  • /api/posts/<id>/: post detail
  • /api/doctors/: list doctors
  • /api/company-info/: clinic/company overview
  • /api/company-locations/: list clinic locations
  • /api/comments/: list comments
  • /api/booking/: create booking request
  • /api/callback/: create callback request

API Documentation

  • /schema/: OpenAPI schema
  • /schema/swagger-ui/: Swagger UI
  • /schema/redoc/: ReDoc

Data Model Overview

  • Service: detailed treatment or clinic service information with images, benefits, and media blocks
  • Doctor: doctor profiles, biography, education, and social links
  • Post: blog-style content entries with image galleries
  • CompanyInfo: main clinic/company information and shared contact details
  • CompanyLocation: clinic branch or office locations
  • Comment: public testimonial or feedback entries
  • Booking: appointment request linked to a service and office
  • CallBackRequest: callback request entry keyed by email

Configuration

Important settings live in core/settings.py.

Things you will likely want to review before real use:

  • SECRET_KEY
  • DEBUG
  • ALLOWED_HOSTS
  • CORS settings
  • API schema metadata

Notes

  • The project uses SQLite by default through db.sqlite3.
  • CallBackRequest.email is unique, so duplicate callback requests for the same email will not be accepted.
  • The doctors endpoint uses django-filter, so frontend integrations can build filtered staff views on top of it.
  • The API is configured with open permissions and no default authentication classes, which is convenient for development but should be reviewed before public deployment.

Disclaimer

Use this project as a learning base or backend starter, and review validation, permissions, rate limiting, CORS policy, and deployment security carefully before exposing it publicly.

About

Django REST API for a dental clinic backend with doctors, services, posts, bookings, callbacks, and OpenAPI docs.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages