Skip to content
sam, the smart assignment manager is a web tool created with react to organize students' assignments within a class or a group inside that class.
JavaScript Java CSS HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
documentation
sam-api
sam-frontend
.gitignore
Jenkinsfile
README.md

README.md

sam - the smart assignment manager

Vision ▪️ Host ▪️ Jenkins ▪️ SonarQube

Setup

sam-api

Within the sam-api folder is the RESTful JSON API for our application. To import the Java Spring application into Intellij IDEA, select the Import Project option and open the file at sam-api/pom.xml. Leave all settings the way they are when importing.

For development you'll need to input your local databases information in sam-api/src/main/resources/application.properties. Change the URL, the username and password according to your needs. (You'll need to create the MySQL database yourself but all the tables are automatically generated when running the application. For a more detailed explanation, check the section sam-database below.)

# Install maven dependencies:
mvn install

# Run tests:
mvn test

# Run backend on UNIX:
./mvnw spring-boot:run

# Run backend on Windows:
mvnw.cmd spring-boot:run

# Build and run backend from .jar file:
./mvnw clean package
java -jar target/sam-api-1.0.0.jar

sam-frontend

Within the sam-frontend folder is the React based client for our application.

For development you'll need to make sure that the sam-api is running and the necessary databases are set up, since the application will interact with the RESTful JSON API.

The frontend is set up with a pre-commit routine with prettier.io and will clean up your JavaScript code before each commit.

# Install node-modules:
npm install

# Run developer preview:
npm start

# Run test watcher:
npm test

# Run tests with coverage report:
npm run coverage

# Build for deployment:
npm run build

sam-database

Before running sam-api for the first time, you'll need to setup a MySQL database that matches the information in sam-api/src/main/resources/application.properties. Make sure your username and password are correct.

You can set it up with the following instruction:

# Set up empty database:
CREATE DATABASE IF NOT EXISTS sam_api;

Now when you run sam-api for the first time, and it will automatically generate the needed tables.

sam-test-database

Before running the tests from sam-api for the first time, you'll need to setup a MySQL test database that matches the information in sam-api/src/test/resources/application.properties. Make sure your username and password are correct.

You can set it up with the following instruction:

# Set up empty database:
CREATE DATABASE IF NOT EXISTS test_sam_api;
You can’t perform that action at this time.