psychonnect

🧠 Psychonnect

Psychonnect is a RESTful API developed in Ruby on Rails for managing psychiatric treatment, allowing control of medical prescriptions, patients, doctors and medications.


✨ Features


πŸš€ Stack


πŸ”§ Installation

  1. Clone the repository:
git clone https://github.com/your-user/psychonnect.git
cd psychonnect
  1. First option is to simply run the setup.sh file:
./setup.sh
  1. Alternatively, follow these steps:
bundle install
cp .env.example .env
bin/rails db:create db:migrate db:seed
bin/rails server

πŸ›‘οΈ Authentication

Create an user, sending name, email, and password to

POST /users

Log in by sending your email and password to

POST /auth/login

Receive a JWT token

Send this token in the header:

Authorization: Bearer

πŸ“¬ Main endpoints bash Always show details

Copy POST /auth/login # Login with email and password GET /users # List (admin only)

PATCH /users/:id/role # Role change (admin only)

GET /medications # List medications POST /medications # Create medication PUT /medications/:id # Update medication DELETE /medications/:id # Remove medication

POST /prescriptions # Create prescription GET /prescriptions # List current treatment GET /prescriptions/history/:id # Patient history πŸ§ͺ Tests Run the test suite:

bash Always show details

Copy bin/rspec 100% guaranteed coverageβ„’ 🧼

πŸ“„ Swagger documentation After running the server, access:

bash Always show details

Copy http://localhost:3000/api-docs πŸ“Œ ALL future Web interface (React or Vue)

Side Effect Tracking

Medication Notifications and Reminders

Treatment Charts and Reports

πŸ‘¨β€βš•οΈ Developed by Rodrigo (a.k.a. Gyodai) More than a dev: a Rails warrior with a plan.

🧠 Project Philosophy β€œThe madness you have may be exactly what the world needs.” β€œβ€