Psychonnect is a RESTful API developed in Ruby on Rails for managing psychiatric treatment, allowing control of medical prescriptions, patients, doctors and medications.
admin
, physician
and patient
git clone https://github.com/your-user/psychonnect.git
cd psychonnect
./setup.sh
bundle install
cp .env.example .env
bin/rails db:create db:migrate db:seed
bin/rails server
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.β ββ