/Healme-API

A modern health_care API that has all the functionalitites of non-blocking appointments and rescheduling , logging and diagnosis privacy and data access security.

Primary LanguageGoMIT LicenseMIT

๐Ÿฅ HealthTech Wizardry API ๐Ÿง™โ€โ™‚๏ธ

Welcome to the most magical healthcare API this side of Hogwarts! We've combined the healing powers of Go with the sorcery of modern web technologies to create an API so powerful, it might just cure the common cold (disclaimer: it won't).

๐ŸŒŸ Features

  • Appointment Scheduling: Because time-turners are so last century.
  • Patient Management: Keep track of your patients better than Dumbledore kept track of Harry.
  • Doctor Management: Organize your healers like McGonagall organizes her class schedule.
  • User Authentication: More secure than Gringotts, less grumpy than goblins.

๐Ÿš€ Getting Started

Prerequisites

  • Go (version 1.16+)
  • PostgreSQL (because even wizards need reliable databases)
  • A sense of humor (critical for debugging)

๐Ÿง™โ€โ™€๏ธ API Documentation

Authentication Spells ๐Ÿ”

Register a New User

POST /api/register

Body:

{
  "email": "harry.potter@hogwarts.edu",
  "password": "ExpectoAPIum!",
  "role": "patient"
}

Login

POST /api/login

Body:

{
  "email": "harry.potter@hogwarts.edu",
  "password": "ExpectoAPIum!"
}

Patient Charms ๐Ÿง‘โ€โš•๏ธ

Get All Patients

GET /api/patients

Get Single Patient

GET /api/patients/:id

Update Patient

PUT /api/patients/:id

Doctor Enchantments ๐Ÿ‘ฉโ€โš•๏ธ

Get All Doctors

GET /api/doctors

Get Single Doctor

GET /api/doctors/:id

Update Doctor

PUT /api/doctors/:id

Appointment Alchemy โฐ

Create Appointment

POST /api/appointments

Body:

{
  "patient_id": 1,
  "doctor_id": 2,
  "date_time": "2023-05-01T14:30:00Z",
  "description": "Wand arm feeling a bit wonky"
}

Get All Appointments

GET /api/appointments

Update Appointment

PUT /api/appointments/:id

Delete Appointment

DELETE /api/appointments/:id

๐Ÿ“Š Schema Flowchart

Schema

๐Ÿงช Testing

Run tests faster than Snape takes points from Gryffindor:

go test ./...

๐Ÿšข Deployment

  1. Summon a Docker container:
   docker-compose up --build
  1. Deploy to the cloud using Vercel, because even APIs need a little magic in the sky.

๐Ÿง™โ€โ™‚๏ธ Contributing

Contributions are welcome! Just make sure your code is cleaner than Filch's mop and more organized than Hermione's study schedule.

๐Ÿ“œ License

This project is licensed under the Spell-It-Yourself License. Use it wisely, and may your code always compile on the first try!