A platform that allowed the user to generate their own content (programming exercises) was developed during my final year at Kingston University.
The execution was handled by NoobLab system already existing at the university.
Project-oriented with allowing the university to gain a permanent source of new exercises from past students, that would be provided to the new/future students.
- Create exercises
- Allow for automatic exercise testing+execution (Passed to NoobLab)
- Search for exercises (Sort by + Word Query)
- Rate Exercises (Like system)
- Secure Login System
Firstly go to ./back-end/
and run npm i
to install the packages.
Then do the same in ./front-end/
Once you have installed all the dependencies you can run the project with client only or full start. (You must be in ./front-end/
) Running client takes only a few seconds where the entire server might take up till a minute.
npm run client
npm start
Can be run at port localhost:3306 (The server will try to connect to server below)
const connection = mysql.createConnection({
host: "localhost",
user: "root",
password: "",
database: "db",
});
A database called db
needs to exist with a table called pages
.
You can extract it from ./db.sql
example at ./.env
can be moved into ./back-end/.env
with your own parameters inside it.
CREATE TABLE `pages` (
`id` int(11) NOT NULL,
`email` varchar(11) NOT NULL,
`date_added` date NOT NULL DEFAULT current_timestamp(),
`data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`data`))
);
TIP: id
is has to be later set to Primary key
and Auto Incremental
Format: [Request] [Path] [Body Requirements]
POST /api/authenticate/request
- [email]
Will send an message to the selected email by attaching a domain name to it. Send from email from ./.env
POST /api/authenticate/provide
- [email, code]
Once email and correct code are provided then a verification token will be created and send to the user
POST /api/questions/create
- [email, token, page]
Email and token to confirm who is creating the question. Data for the question must be found in page
GET /api/questions/:id
Question html gets generated from the data received from the mysql server.
GET /api/exercises/content/:time/:email/:page"
Sends first 10 questions offset by (:page-1)*10 created by :email. It is possible to select :email "all" to get questions made by all. Parameter :time can be inserted to get all recent for example
GET /api/exercises/count/:email/"
Get amount of questions for :email or all