command
module
Version:
v0.0.0-...-99d0739
Opens a new window with list of versions in this module.
Published: Jul 3, 2025
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
MeReMa Server
docker and docker-compose for PostgreSQL dockerimage (to ensure synchronization between devs)
dbmate for database migration. This tool act like Git for database schema
swaggo/swag for API documentation. This especially useful for frontend dev as they can test API directly from SwaggerUI generated by swaggo.

Makefile for simplifying commands running and synchronization of $ENV.
Main structure
/api: provides api for clients
/services: handles app's core business logics
/repo: handles communication with database
/models: describes DTOs, errors and permissions, share betwwen 3 layers of server
Required envs (setup a .env, see .env.example)
GMAIL_USERNAME (ex: haha@gmail.com, ...)
GMAIL_PASSWORD (google app password, 12 char long)
JWT_SECRET (a non-empty string)
JWT_SESSION_EXPIRATION (an integer, measured in minutes)
JWT_RECOVERY_EXPIRATION (an integer, measured in minutes)
JWT_REGISTRATION_EXPIRATION (an integer, measured in minutes)
FILE_STORAGE_PATH (an absolute path or relative path, where files, images will be stored)
Server setup (for Linux devs only)
- Clone this repo:
git clone https://github.com/MeReMa-UIT/server
- Install
docker, docker-compose and dbmate
- Run
make setup to install golang's dependecies and tools (this doesn't include docker, docker-compose and dbmate)
- Run
make migrate-up for database schema update.
- Run
make or make run
- Swagger UI is available at http://localhost:8080/swagger/index.html
Server testing
- Admin 1:
- Admin 2:
- Receptionist 1:
- ID: 000000001111
- Password: 123456
- Doctor 1:
- ID: 000000001112
- Password: 123456
- Patient 1:
- ID: 000000001113
- Password: 123456
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Package docs Code generated by swaggo/swag.
|
Package docs Code generated by swaggo/swag. |
|
|
|
|
|
|
|
|
|
|
|
|
services
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.