Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
/ achievements Public archive

Web-project awarding achievements and points to participants of some academy.

Notifications You must be signed in to change notification settings

dmakhun/achievements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Achievements

Web-project awarding achievements and points to participants of certain groups.

Simple legacy project developed initially by interns. This is non-Spring Boot project. Project compiles on Java 18, runs on Java 17.

Environment installation instructions

For macOS, brew is shown in examples, for Linux/Windows, tools should be installed appropriately.

Either of those can be used to launch an app:

  • Manual start
    • install Mysql database, Maven brew install [email protected] maven
    • start Mysql server /usr/local/opt/[email protected]/bin/mysql.server start
    • connect to Mysql server: mysql -h localhost -u <YOUR_USER> -p
    • create a database: CREATE DATABASE achievements;
    • set properties in src/main/resources/project.properties to your values:
      • SPRING_DATASOURCE_DB_HOST - localhost
      • SPRING_DATASOURCE_USERNAME - your DB username
      • SPRING_DATASOURCE_PASSWORD - your DB password
    • insert test roles/users mysql -h 127.0.0.1 -P 3306 -u <YOUR_USER> -p -D achievements < config/fillDB.sql
    • run Intellij maven run configuration Achievements to start an app on a Tomcat or in a command-line mvn tomcat7:run
  • Build and run on Docker (the simplest/slowest way)
    • install Docker brew --cask install docker
    • build an artifact and create a Docker image of an app docker build -t achievements -f docker/Dockerfile .
    • create docker/.env file with contents:
      DB_USER=<YOUR_DB_USER>
      DB_PASSWORD=<YOUR_DB_PASSWORD>
      DB_ROOT_PASSWORD=<YOUR_DB_ROOT_PASSWORD>
      
    • run an app and the database by Docker compose docker-compose -f docker/docker-compose.yml up
    • insert test roles/users docker exec -i <MYSQL_CONTAINER_ID> mysql -h 127.0.0.1 -P 3306 -u <YOUR_DB_USER> -p<YOUR_DB_PASSWORD> -D achievements < config/fillDB.sql

After launching an app navigate to http://localhost:8080/achievements

You can log in with username/password: admin/admin, manager/manager, user/user for an appropriate role in the project.

Roles

  • Admin: creates achievement types, creates new managers
  • Manager: creates groups, approves participants into groups, awards achievements
  • User: sends request to join a group for a particular competence

Screenshots

Alt Text Alt Text Alt Text Alt Text Alt Text

Code is formatted with slightly modified default Intellij code style config, can be imported from config/intellij-code-style.xml

About

Web-project awarding achievements and points to participants of some academy.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published