Case Study
Project Case Study
Challenges, solutions, outcomes, technical highlights, architecture, and project scale.
⚡
Challenges
- Need for appointment booking system without mandatory registration and automatic user account creation
- Managing Jalali dates in the booking system
- SMS-based authentication instead of traditional passwords
- Managing different types of medical requests in a unified system
- Creating an admin panel for tracking and confirming reservations
- Integration with Ghasedak SMS service
💡
Solutions
- Implementing booking system with automatic user registration at booking time
- Using persiantools library for Jalali to Gregorian date conversion
- Designing SMS-based authentication system with Ghasedak API
- Designing Reservation model to store booking info including doctor type, date, and description
- Implementing AJAX system for seamless server communication
- Using pymysql for MySQL connection
- Designing admin panel with reservation approve/reject capability
- Using custom User model inheriting from AbstractUser
📚
Outcomes
- User-friendly and fast appointment booking system
- Automatic registration without long forms
- Secure SMS authentication
- Complete admin panel for tracking reservations
- Jalali calendar support
- Responsive design
- Reducing appointment booking time to less than a minute
🔧
Technical Highlights
- Django 5.0.1 and Python 3
- MySQL database with pymysql
- Custom User model (AUTH_USER_MODEL)
- SMS-based authentication with Ghasedak API
- Jalali date conversion with persiantools
- Extensive AJAX system with JSON
- Multi-App design (store_account, store_profile)
- Access level management (user, admin, superuser)
- Paginator for pagination
- Automatic user registration at booking time
- Managing medical request types (General, Cardiology, Neurology, Internal Medicine, Gastroenterology, Phone Consultation)
🏗️
Architecture
Doctor Online is built on Django's MVT (Model-View-Template) architecture and consists of two main applications:
1. store_account: Responsible for user management, authentication, and registration
- Custom User model with mobile, access_level, user_image, random_pass fields
- SMS and password login system
- Automatic registration during appointment booking
2. store_profile: Responsible for reservations and profile management
- Reservation model for appointment booking
- Storing medical request type, date, and description
- Admin panel for tracking reservations
The project runs in DEBUG mode and uses SQLite for development and MySQL for production.
📐
Project Scale
- 2 main applications (store_account, store_profile)
- 2 main data models (User, Reservation)
- 6 medical request types (General, Cardiology, Neurology, Internal Medicine, Gastroenterology, Phone Consultation)
- More than 15 pages and HTML templates
- More than 15 views and endpoints
- Complete SMS authentication system
- Dedicated admin panel
- Appointment booking system with automatic registration
- Full Jalali calendar support