Skip to content

A web system to help users manage and track their medication expiration dates and send reminders to renew those that have expired

License

Notifications You must be signed in to change notification settings

NicolasOmar/meds-warning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

195 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MedsWarning

A web system to help users manage and track their medication expiration dates and send reminders to renew those that have expired.

Table of contents

Purpose

After developing several React-based applications with a similar tooling stack, I wanted to expand my skills in several concepts (such as server-side rendering) and libraries (such as zod, prisma, and shadcn).

Also, I wanted to unify this new stack into a tool, though for a common issue, the expiration date.

The tool's objective is to create notifications across several channels that warn the user which meds are about to expire and avoid unpleasant situations (sometimes we need a pill for a headache, and if it is consumed after that date, its effect can be reduced to zero or provoke side effects).

Status

Project version Code Coverage Quality Gate Status Maintainability Rating Security Rating Technical Debt Known Vulnerabilities GitHub Repo stars GitHub commit activity GitHub last commit Semantic Commits

Project Stack

nextjs dependency react dependency lucide-react dependency typescript dependency prisma dependency postgres dependency tailwind dependency zod dependency vitest dependency react testing library dependency eslint dependency prettier dependency lint-staged dependency husky dependency semantic-release dependency commitlint dependency

What do I need?

Before cloning this repo, I recommend installing the following software:

Setup

After cloning the repo, install the node packages in the project's root file.

git clone https://github.com/NicolasOmar/meds-warning.git
cd meds-warning
npm run setup

At last, create an .env file at your project's root with the following content.

DATABASE_URL=HERE_GOES_YOUR_DATABASE_CONNECTION_STRING
MAILGUN_API=HERE_GOES_YOUR_MAILGUN_API
MAILGUN_MAIL_SENDER=HERE_GOES_YOUR_MAILGUN_MAIL_SENDER
JWT_SECRET=HERE_GOES_YOUR_JWT_SECRET
TEST_PASSWORD=HERE_GOES_YOUR_TEST_PASSWORD

TEST_PASSWORD is only for a placeholder text in certain scenarios; its data will not impact any database

How to run it

To run it, simply execute

npm start

In case you want to execute it as a single instance (using a production-like build)

npm start:prod

Folder structure

In case you have cloned the repo, it will show you the following folders:

  • .github: Github Actions files used to run post-merge commits like unit test coverage collection.
  • .husky: Dedicated to Husky configuration files.
  • actions: Dedicated to React's Server Functions. Organized by entity.
  • app: Location of system's routes structure based on NextJs App Router.
  • components: Location of all used components:
    • base: Those installed from shadcn.
    • custom: Implementations of base components with logic included to handle specific tasks.
    • forms: Form components with their own input structure and action call. Those are client components due to the useActionState hook.
  • prisma: Location of prisma implementation with its models/entities and migrations to mirror the entities relationship in the database.
  • shared: Location of shared pieces of reusable code to be used across the system.
    • constants:: Dedicated to labels, strings, regular expressions, and configuration objects.
    • functions:: Dedicated to generalistic functions that can be used across the application.
    • ts: Dedicated to typescript interfaces, types, enums, and other features.

Branches and Environments

After my previous experience with semantic-release in other projects, I decided to give the following meaning to the project's versions after v4.0.0:

  • Major versions (5.0.0, 6.0.0, and beyond) will refer to milestone achievements and significant changes that will need extra attention before the update.
  • Minor versions (4.1.0, 4.2.0, and so on) will refer to bug fixes that required several important code changes or specific new features.
  • Patch versions (4.0.1, 4.0.2, and so on) will refer to bug fixes that required small code changes or weekly dependency updates.

To check the current project's status, go to the Roadmap section.

Branching

Given the mentioned release logic, main is the only static branch, and each developed feature or fix will have a unique branch with its PR and a merge commit following semantic versioning and semantic commits specifications.

Roadmap

The first version/release (v1.0) was created to investigate, pick, and integrate several libraries as project technical foundations, which took the shape of a proof of concept that you can review here.

Right now, I have listed the first series of features related to the project's objective. which will be shipped as part of release v2.0

Right before delivering the last feature, I will work on at least a third series of improvements in order to create a solid solution for any user.

I will keep you posted on any updates, which will be forthcoming shortly.

Nowadays, I am updating the rest of the dependencies every week, creating a PR alongside its related branch and PR to maintain track of those updates.

If you want the actual short-term status, go to the project board (powered by GitHub Projects).

License

GPL 3.0

About

A web system to help users manage and track their medication expiration dates and send reminders to renew those that have expired

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages