Skip to content

iraunit/Attendance-Go

Repository files navigation

Attendance Management System (AMS) - GoLang

This is an Attendance Management System (AMS) written in GoLang. It is a backend system responsible for managing attendance records. This project utilizes various third-party modules for different functionalities.

Modules Used

  • github.com/caarlos0/env
  • github.com/go-pg/pg
  • github.com/golang-jwt/jwt
  • github.com/google/subcommands
  • github.com/google/uuid
  • github.com/google/wire
  • github.com/gorilla/mux
  • github.com/jinzhu/inflection
  • github.com/joho/godotenv
  • github.com/pmezard/go-difflib
  • github.com/rs/cors
  • go.uber.org/multierr
  • go.uber.org/zap
  • golang.org/x/crypto
  • golang.org/x/mod
  • golang.org/x/tools
  • mellium.im/sasl

Installation and Setup

Clone the repository:

git clone https://github.com/raunit-verma/Attendance-Go.git

Navigate to the project directory:

cd  Attendance-Go  

Set up environment variables:

DB_USER=postgres
DB_ADDRESS=localhost:5432
DB_PASSWORD=1234
DB_DATABASE=attendance

TYPE=Development # or TYPE=Production

DB_USER_PRODUCTION=
DB_ADDRESS_PRODUCTION=
DB_PASSWORD_PRODUCTION=
DB_DATABASE_PRODUCTION=

PORT=1025
URL=http://localhost:3000

DOMAIN=localhost
JWT_KEY=Devtron@Raunit

PRINCIPAL_PASSWORD= # Do not use plain password, use hased password using bcrypt

Download all modules:

go mod download

Run wire to generate wire gen.go:

go run -mod=mod github.com/google/wire/cmd/wire

Build the server:

go build -o server .

Run the server:

./server

Docker

You can also run the application using Docker. A Dockerfile is provided in the repository. In case of running docker image don't forget to add PSQL in same image or another image.

Build the Docker image:

docker build -t attendance-management-system .

Run the Docker container:

docker run -p 1025:1025 attendance-management-system

Frontend

The frontend code for this project can be found here. You can integrate it with this backend to create a complete Attendance Management System.

Docker Hub Image

An image of this backend is available on Docker Hub here. You can pull this image and run it as a Docker container.

Contribution

Contributions are welcome. Feel free to open issues and pull requests.

License

This project is licensed under the MIT License.

About

View the Deployed Version Here

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors