myDoctor is an online medical consultation/telemedicine app designed to be a fast, easy, and convenient way for users to book appointments to see a doctor via video call. It was built as the final team project for the 4Geeks Academy bootcamp. The system provides a platform where:
- Patients can register, browse available doctors, and book video consultations
- Payments are handled securely through Stripe integration
- Users can access health news via an external news API
- Appointments can be managed (booking, viewing, and cancellation)
Click to view the presentation of the app on YouTube
| Feature | Description |
|---|---|
| User Authentication | Secure signup, login, and password recovery system |
| Doctor Selection | Browse doctors with filtering by specialty |
| Appointment Booking | Schedule consultations with selected doctors |
| Payment Processing | Secure payment handling via Stripe integration |
| Appointment Management | View upcoming consultations and cancel if needed |
| Health News | Access to curated health news via external API |
| Medical Reports | Documentation of consultation outcomes |
The application follows a client-server architecture with a clear separation between:
- Frontend: Built with React.js for a responsive, component-based UI
- Backend: Powered by Flask and SQLAlchemy for handling business logic and data access and JSON Web Tokens for user authentication
- Database: PostgreSQL for storing user, doctor, and appointment data
- External Services: Stripe for payment processing and News API for health content
| Component | Description | Implementation |
|---|---|---|
| React Frontend | User interface components | React.js with component-based architecture |
| Frontend Routing | Navigation between pages | React Router with defined routes |
| State Management | Global state and actions | Context API with Flux-like pattern |
| Backend API | RESTful API endpoints | Flask Blueprint with defined routes |
| Authentication | User identity verification | JWT (JSON Web Tokens) |
| Database | Data persistence | PostgreSQL with SQLAlchemy ORM |
| External Services | Third-party integrations | Stripe for payments, News API for health content |
This data model allows the system to track:
- User accounts and authentication
- Doctor profiles with specialties and pricing
- Scheduled appointments with date/time information
- Medical reports containing consultation outcomes and health metrics
The typical user journey through the myDoctor application follows this process:
| Endpoint | Method | Description | Authentication |
|---|---|---|---|
/api/hello |
GET, POST | Test endpoint | No |
/api/signup |
POST | Create new user account | No |
/api/token |
POST | Authenticate and get JWT token | No |
/api/protected |
GET | Test JWT authentication | Yes |
/api/report |
GET | Get all medical reports | No |
/api/report/<id> |
GET | Get specific medical report | No |
/api/doctors |
GET | List all doctors | No |
/api/booking |
POST | Create new appointment | No |
/api/appointments |
GET | List all appointments | No |
/api/appointments/<id> |
DELETE | Delete specific appointment | No |
/api/create-checkout-session |
POST | Create Stripe checkout session | No |
Frontend Technologies
- HTML
- CSS
- JavaScript
- React.js: Component-based UI library for building the user interface
- React Router: Navigation and routing between application pages
- React Bootstrap: UI component library for consistent styling
- React Tabs: For the tabbed interface in the user dashboard
- React DatePicker: For appointment date/time selection
Backend Technologies
- Flask: Python web framework for the API
- SQLAlchemy: ORM for database operations
- Flask-JWT-Extended: For user authentication
- Flask-Migrate: For database schema migrations
- Stripe API: For payment processing
- News API: For health news integration
Database
- PostgreSQL: Relational database for persistent data storage
Development & Deployment
- Webpack: Asset bundling and development server
- Gunicorn: WSGI HTTP server for deployment
- Python-dotenv: Environment variable management
If you use Github Codespaces (recommended) or Gitpod this template will already come with Python, Node and the Postgres database installed. If you are working locally make sure to install Python 3.10, Node
It is recomended to install the backend first, make sure you have Python 3.8, Pipenv and a database engine (Posgress recomended)
- Install the python packages:
$ pipenv install - Create a .env file based on the .env.example:
$ cp .env.example .env - Install your database engine and create your database, depending on your database you have to create a DATABASE_URL variable with one of the possible values, make sure you replace the valudes with your database information:
| Engine | DATABASE_URL |
|---|---|
| SQLite | sqlite:////test.db |
| MySQL | mysql://username:password@localhost:port/example |
| Postgress | postgres://username:password@localhost:5432/example |
- Migrate the migrations:
$ pipenv run migrate(skip if you have not made changes to the models on the./src/api/models.py) - Run the migrations:
$ pipenv run upgrade - Run the application:
$ pipenv run start
Note: Codespaces users can connect to psql by typing:
psql -h localhost -U gitpod example
To insert test users in the database execute the following command:
$ flask insert-test-users 5And you will see the following message:
Creating test users
test_user1@test.com created.
test_user2@test.com created.
test_user3@test.com created.
test_user4@test.com created.
test_user5@test.com created.
Users created successfully!
To update with all yours tables you can edit the file app.py and go to the line 80 to insert the code to populate others tables
- Make sure you are using node version 14+ and that you have already successfully installed and runned the backend.
- Install the packages:
$ npm install - Start the webpack dev server
$ npm run start.







