| runme | ||||
|---|---|---|---|---|
|
HaloSuster is an app that nurses to record patient medical records
HaloSuster offers the following features:
- Authentication:
- User IT registration
- User IT login
- User Nurse login
- Nurse Management (CRUD):
- Add Nurse
- View Users
- Update Nurse
- Delete Nurse
- Grant Nurse Access
- Manage Medical Record:
- Add Medical Patient
- View Medical Patients
- Add Medical Record
- View Medical Records
- Image Upload:
- Upload Image
Before running this app make sure you have this installed on your puter :
To run the application, follow these steps before run the program:
- Make sure you have Golang, PostgreSQL, Golang Migrate, and Docker installed and configured on your system.
- Clone this repository:
git clone https://github.com/sedelinggam/halo-suster.git
- Navigate to the project directory:
cd halo-suster
- Run the following command to install dependencies:
go mod download
- Run the following command to create environment for the application:
mv .env.sample .env
- Setting Up Environment Variables
Before starting the application, you need to set up the following environment variables:
DB_NAME: Name of your PostgreSQL databaseDB_PORT: Port of your PostgreSQL database (default: 5432)DB_HOST: Hostname or IP address of your PostgreSQL serverDB_USERNAME: Username for your PostgreSQL databaseDB_PASSWORD: Password for your PostgreSQL databaseDB_PARAMS: Additional connection parameters for PostgreSQL (e.g., sslmode=disabled)JWT_SECRET: Secret key used for generating JSON Web Tokens (JWT)BCRYPT_SALT: Salt for password hashing (use a higher value than 8 in production!)
- Database Migrations
- Apply migrations to the database:
make migrate-dev
- Running the Application
make run
You can access the application in your web browser at http://localhost:8080
Make sure you already installed Docker on your computer.
Adjust the .env file to make sure it's connected to the database and then you can build the Docker image by running:
make build-imageAfter the image is build, adjust the .env and you can run it using:
make run-image