EricWay1024 / nott-course-server-cpp

C++ Web Server for Nott Course, an unofficial enhanced version of University of Nottingham's course catalogue.

Home Page:https://nott-course.ericway.xyz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C++ Web Server for Nott Course

Find more about the project: EricWay1024/nott-course: React app of an unofficial enhancement of the course catalogue offered by University of Nottingham.

Built With

Getting Started

All commands tested on Debian Bullseye.

Clone this repo. Note that SQLiteCpp is included as a submodule of this repo.

git clone --recurse-submodules https://github.com/EricWay1024/nott-course-server-cpp.git

Install Crow.

wget https://github.com/CrowCpp/Crow/releases/download/v1.0%2B3/crow-v1.0+3.deb
sudo apt install ./crow-v1.0+3.deb
rm ./crow-v1.0+3.deb

Building and Running

mkdir build
cd build
cmake ..
cmake --build .
cp ../data.db .
./nottCourseServer &

Database Specification

data.db is a SQLite database with two tables: course and plan. All fields in both tables are stored as text, but some fields are stringified JSON objects. See table schemas below.

CREATE TABLE course (
        id BIGINT, 
        code TEXT, 
        title TEXT, 
        credits TEXT, 
        level TEXT, 
        summary TEXT, 
        aims TEXT, 
        offering TEXT, 
        convenor TEXT, 
        semester TEXT, 
        requisites TEXT, 
        "additionalRequirements" TEXT, 
        outcome TEXT, 
        "targetStudents" TEXT, 
        "assessmentPeriod" TEXT, 
        "courseWebLinks" TEXT, 
        class TEXT, 
        assessment TEXT, 
        "belongsTo" TEXT
);
CREATE INDEX ix_course_id ON course (id);

CREATE TABLE IF NOT EXISTS "plan" (
        id BIGINT, 
        title TEXT, 
        "academicPlanCode" TEXT, 
        "ucasCode" TEXT, 
        school TEXT, 
        "planType" TEXT, 
        "academicLoad" TEXT, 
        "deliveryMode" TEXT, 
        "planAccreditation" TEXT, 
        "subjectBenchmark" TEXT, 
        "educationalAimsIntro" TEXT, 
        "educationalAims" TEXT, 
        "outlineDescription" TEXT, 
        "distinguishingFeatures" TEXT, 
        "furtherInformation" TEXT, 
        "planRequirements" TEXT, 
        "includingSubjects" TEXT, 
        "excludingSubjects" TEXT, 
        "otherRequirements" TEXT, 
        "ieltsRequirements" TEXT, 
        "generalInformation" TEXT, 
        modules TEXT, 
        assessment TEXT, 
        "assessmentMarking" TEXT, 
        "progressionInformation" TEXT, 
        "borderlineCriteria" TEXT, 
        "degreeInformation" TEXT, 
        "courseWeightings" TEXT, 
        "degreeCalculationModel" TEXT, 
        "otherRegulations" TEXT, 
        "notwithstandingRegulations" TEXT, 
        overview TEXT, 
        "assessmentMethods" TEXT, 
        "teachingAndLearning" TEXT, 
        "learningOutcomes" TEXT, 
        "degreeType" TEXT, 
        degree TEXT
);

The following fields are stringified JSON:

Table course:

[
    "convenor",
    "requisites",
    "additionalRequirements",
    "courseWebLinks",
    "class",
    "assessment",
    "belongsTo"
]

Table plan:

[
    "school",
    "planAccreditation",
    "subjectBenchmark",
    "modules",
    "courseWeightings",
    "degreeCalculationModel"
]

About

C++ Web Server for Nott Course, an unofficial enhanced version of University of Nottingham's course catalogue.

https://nott-course.ericway.xyz/


Languages

Language:C++ 97.3%Language:CMake 2.7%