iitk-coin

module
v0.0.0-...-9da9d5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2021 License: MIT

README

IITK Coin

made-with-Go Go version Docker Cloud Build Status Go Build License GitHub Repo stars

IITK Coin is a reward-based pseudo-currency system for the IIT Kanpur campus junta.

Detailed vision and regulation rules of this currency are documented in the wiki here.

This repository holds the backend system, developed with Go and PostgreSQL.

The React Native application of IITK Coin is maintained at :octocat: bhuvansingla/iitk-coin-native-app.

Build and Run

From Source

# Create the directories if they don't exist already.
cd $GOPATH/src/github.com/bhuvansingla/

# Clone the repository inside.
git clone git@github.com:bhuvansingla/iitk-coin.git
 
cd ./iitk-coin

# Build the project.
go build -o iitk-coin cmd/iitk-coin/main.go

# Update config.yml

# Run it.
./iitk-coin

From Docker
# Pull the latest image from DockerHub.
docker pull bhuvansingla/iitk-coin:latest

# Update config.yml

# Run it on port 80 (or whichever you want).
docker run -p 80:8080 -d --name iitk_coin_backend bhuvansingla/iitk-coin

# To access the container shell:
docker exec -t -i iitk_coin_backend /bin/sh

Update and Verify User Roles

# Ensure that the user, that you want to update the role for, exists.

# Give permissions to execute (if not present already)
chmod +x scripts/*.sh

# Execute the following interactive script to update the role:
bash ./scripts/update-user-role.sh

# To verify user that have a particular role:
bash ./scripts/list-users-by-role.sh

Contributing

The project is open to contributions from the community. For bug fixes and feature requests, please refer to the CONTRIBUTING guide.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL