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.
- 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
Clone the repository:
git clone https://github.com/raunit-verma/Attendance-Go.gitNavigate 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 bcryptDownload all modules:
go mod downloadRun wire to generate wire gen.go:
go run -mod=mod github.com/google/wire/cmd/wireBuild the server:
go build -o server .Run the server:
./serverYou 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-systemThe frontend code for this project can be found here. You can integrate it with this backend to create a complete Attendance Management System.
An image of this backend is available on Docker Hub here. You can pull this image and run it as a Docker container.
Contributions are welcome. Feel free to open issues and pull requests.
This project is licensed under the MIT License.