Git Product home page Git Product logo

medical-clinic's Introduction

Ambush Journey Program - Medical Clinic

This is a repository used by the AJP Backend team to practice building a web server in Go, developing a software for a medical clinic.

The software is used for scheduling, planning and managing medical appointments, as well as medical exams and services.

This project uses Docker, Goose for database migrations, and SQLBoiler for generating models in Golang.

Workflows and Rules

Project tasks and user stories are listed in Trello

Branch guidelines should follow the syntax <type>/<subject> where <type> should be one of feat, bugfix, test or chore, and <subject> should be a very short description on the changes made.

Commit messages can follow the same guidelines from branches, but it's not necessary as long as it describes the changes made clearly.

Make sure to have go fmt running on your editor's save process. For VS Code you can follow the instructions here.

Once you have finished your changes on your feature branch, please open a pull request to the main branch and add the mentors as reviewers.

Building the Server

To build the server, you need to have Docker and Docker Compose installed on your machine. Once installed, you can build and start the server by running the following command in the terminal:

$ docker-compose up

This command reads the docker-compose.yml file and starts all the services defined in it.

Database Migrations with Goose

Goose is a database migration tool. You manage your database schema by creating incremental SQL or Go scripts.

To create a new migration script, use the goose create command followed by the name of your migration:

goose create AddSomeTable sql

This will create a new SQL file in the migrations directory. You can then edit this file to define your migration.

To apply all available migrations, use the goose up command:

$ goose up

To roll back the most recently applied migration, use the goose down command:

$ goose down

Generating Models with SQLBoiler

SQLBoiler is a tool to generate a Go ORM tailored to your database schema.

First, you need to install SQLBoiler and its driver. For PostgreSQL, the driver is psql:

go get -u -t github.com/volatiletech/sqlboiler
go get github.com/volatiletech/sqlboiler/drivers/sqlboiler-psql

Then, you can generate the models by running the following command:

$ sqlboiler psql

This will generate a models directory containing Go files for each table in your database.

medical-clinic's People

Contributors

taka41s avatar mwolfart avatar

Stargazers

 avatar

Watchers

Lucas Lacerda avatar  avatar Guilherme Zabot avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.