Med Cal is a prescription cost calculator that allows users to create prescriptions, add medication items, and calculate the total cost dynamically build on Rails and React. This project uses React on Rails template from Shakacode
- Create prescriptions with a set budget.
- Add prescription items and dynamically calculate total costs.
- Apply discounts for long-duration prescriptions.
- API endpoints for managing prescriptions and medications.
git clone https://github.com/hildakh/medcal.git
cd medcalbundle installyarn installbin/rails db:create db:migrate db:seedforeman start webPOST /prescriptions– Create a prescriptionPUT /prescriptions/:id– Update budgetGET /prescriptions/:id– Retrieve prescription details.
POST /prescriptions/:prescription_id/prescription_items– Add an item to a prescription.
GET /medications– List available medications.GET /medications/:id– Get medication details.
Run all tests using:
bundle exec rspecTo check for code formatting and linting issues:
bundle exec rubocopTo auto-fix linting issues
bundle exec rubocop --auto-correct- 🧪 Add specs for controllers & react components
- 🤖 Feature update
- Implement cost modification logic in frontend to suggest shorter duration
- Add confetti / confirmation when prescription is submitted