SCOMP is a Graphql-based computational service that computes student records in a class and grades each student according to their respective performance in reported subjects.
- Create an admin account.
- Login to an existing admin account.
- Create a class.
- Add a student record to an existing class.
- Compute class report.
- Query class record.
- Query student record.
- Query all existing classes.
- A class must contain at least 2 students to compute class reports.
- Class report can only be generated once.
- Student records cannot be added to a class after a report has been generated for that class.
- To use this service for the same class with another set of students, classes
should be created with names formatted like
ClassName Year
, e.gJSS1 2024
etc. Then students for the newly created class should be added (minimum of 2). - Admin would need to request for class
report
after a delay. This is because report computation is done asynchronously. - Students with the same score will have different class position.
- Students with the same subject score will have different position.
- Go installed.
- A database connection URL from mongodb.com
-
Ensure the latest version of
go
is installed on your device. Visit https://go.dev/doc/install to installgo
. -
Clone this repo to your local device and run
cd scomp
on your terminal. -
Set value for environment variable
DB_URL
{required} andPORT
{optional, default:8080
}. -
Lastly, run
go build
to build the executable and then run./scomp --dev {remove --dev for production}
to start the HTTP server. -
Visit
localhost:PORT
to view the Graphql playground.
Graphql Playground: https://scomp.onrender.com/
OR
Visit the API Documentation on Postman