Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

152 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myDoctor: Fullstack Web Application

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

​ mydoctor

Key Features

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

System Architecture

archi

The application follows a client-server architecture with a clear separation between:

  1. Frontend: Built with React.js for a responsive, component-based UI
  2. Backend: Powered by Flask and SQLAlchemy for handling business logic and data access and JSON Web Tokens for user authentication
  3. Database: PostgreSQL for storing user, doctor, and appointment data
  4. 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

Database Schema

final model

This data model allows the system to track:

  1. User accounts and authentication
  2. Doctor profiles with specialties and pricing
  3. Scheduled appointments with date/time information
  4. Medical reports containing consultation outcomes and health metrics

Entity Relationship Diagram

mod

User Flow

The typical user journey through the myDoctor application follows this process:

userflow

API Endpoints

api_stx

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

Tech Stack

html5   css3   bootstrap   figma   git   python   flask   react   javascript   postgresql   jwt   vscode   webpack   postman   npm   sqlalchemy

Frontend Technologies

  1. HTML
  2. CSS
  3. JavaScript
  4. 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

  1. Flask: Python web framework for the API
  2. SQLAlchemy: ORM for database operations
  3. Flask-JWT-Extended: For user authentication
  4. Flask-Migrate: For database schema migrations
  5. Stripe API: For payment processing
  6. News API: For health news integration

Database

  1. PostgreSQL: Relational database for persistent data storage

Development & Deployment

  1. Webpack: Asset bundling and development server
  2. Gunicorn: WSGI HTTP server for deployment
  3. Python-dotenv: Environment variable management

Pages

Screenshot 2023-11-27 at 7 22 34 PM

Screenshot 2023-11-27 at 7 33 58 PM

Installation:

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)

  1. Install the python packages: $ pipenv install
  2. Create a .env file based on the .env.example: $ cp .env.example .env
  3. 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
  1. Migrate the migrations: $ pipenv run migrate (skip if you have not made changes to the models on the ./src/api/models.py)
  2. Run the migrations: $ pipenv run upgrade
  3. Run the application: $ pipenv run start

Note: Codespaces users can connect to psql by typing: psql -h localhost -U gitpod example

Backend Populate Table Users

To insert test users in the database execute the following command:

$ flask insert-test-users 5

And 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

Frontend Manual Installation:

  • Make sure you are using node version 14+ and that you have already successfully installed and runned the backend.
  1. Install the packages: $ npm install
  2. Start the webpack dev server $ npm run start .

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages