Skip to content

Latest commit

 

History

History
186 lines (144 loc) · 4.19 KB

README.md

File metadata and controls

186 lines (144 loc) · 4.19 KB

🏥 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!