Independent software project · university study platform

Degree Margins

A subject-aware study workspace built around how a degree actually accumulates: modules, reading, concepts, research papers, statistics, assignments, revision and dissertation work, all kept in one connected notebook.

The platform began with psychology, then developed into a common application that can support different UK degree subjects without cloning the system for each discipline.

PSYCHOLOGY · RESEARCH METHODS · WEEK 04

Choosing an analysis

Start with the research question, identify the variables, then check what the design actually permits.

Within-subject? Repeated observations change the model.

Link the method page to the lecture, paper, dataset and assessment it belongs to.

  • Not just a note app. The relationships between things are part of the data.
  • Subject-specific teaching sits inside the same workspace as the student's own material.

01What the platform is

Degree Margins is designed as an academic working environment rather than a library of generic course notes. The organising idea is that the pieces of university work should remain connected to one another instead of being spread across unrelated folders, browser tabs and apps.

Organise the degree

Modules, weeks, lectures, assessments, tasks, marks and deadlines provide the structure around day-to-day study.

Connect the knowledge

Concepts, studies, researchers, papers, glossary terms and notes can be linked rather than stored as isolated fragments.

Use it to work

Reading, revision, statistics, methods, assignment planning and dissertation tools turn stored information into an active workspace.

02Core parts of the workspace

  • Course structuremodules · weeks · tasks
  • Knowledge graphconcepts · studies · people · links
  • Reading systemEPUB · text-layer PDF · indexing
  • Research methods & statisticsteaching · decisions · walkthroughs
  • Revisioncards · spaced review · teach-back
  • Long-form workassignments · dissertation · supervision

03How it is built

The application deliberately uses a comparatively small production stack. Public pages are server-rendered, the study workspace runs as a browser application, PHP owns the application boundary, and relational data lives in MariaDB/MySQL.

Front endVanilla JavaScript ES modules, CSS and browser APIs. The study workspace behaves as a single-page application without a production Node or bundler dependency.
ApplicationPHP handles host-aware routing, authentication, API requests, access control, content processing, imports, exports and platform services.
DatabaseMariaDB/MySQL through PDO, with UTF-8 data, numbered schema migrations and explicit workspace ownership for study records.
DeliveryServer-rendered public pages on the main domain, with subject-aware application routes and controlled subdomains served by the same codebase.
StorageUploads, sessions, logs and backups are held in application-managed storage with private paths separated from directly served public assets.
BillingStripe Checkout, customer portal and signed webhooks handle subscription state without Degree Margins processing card details itself.

04Data model and tenancy

The account represents the person; the workspace represents that person's notebook for a particular subject. Study records carry the workspace identifier so modules, notes, readings, revision material, assignments, books and dissertation records stay within that subject context.

Shared identity

A single account can move between the platform's controlled subject areas without creating separate credentials for each notebook.

Scoped records

Data helpers attach the active workspace to new study records and constrain reads, updates and deletions to that workspace.

Portable data

Workspace data can be exported and backed up independently rather than being conceptually locked to one screen or tool.

05Security model

Security is layered rather than delegated to a single control. The hosting perimeter provides HTTPS/TLS and server-level protections; the application adds its own authentication, request, storage and tenancy controls.

Passwords and sessions

Passwords are stored using one-way password hashing. Session identifiers are regenerated around sensitive authentication changes, with Secure, HttpOnly and SameSite cookie controls in production.

Request integrity

State-changing browser requests use per-session CSRF protection, and host-aware routing prevents one controlled subject context from silently writing into another.

Database access

PDO prepared statements and bound parameters are used for values. Dynamic identifiers are separately validated instead of accepting arbitrary user-supplied SQL fragments.

Workspace isolation

Study data is explicitly workspace-scoped. Data-layer helpers constrain updates and deletes so one workspace cannot operate on another workspace's records.

Private application data

Environment configuration, logs, backups, SQL data and other private directories are kept outside normal public routes and blocked from direct HTTP access.

Abuse controls

Authentication attempts are throttled and recorded, reducing the usefulness of rapid repeated login attempts.

Payments

Payment-card information is handled by Stripe. Subscription events arrive through a dedicated webhook and are verified using the webhook signing secret.

Production perimeter

The application assumes HTTPS-only production delivery, managed DNS and certificate handling, restricted server administration and provider-level infrastructure controls around the PHP and database environment.

Current project

Built as a real study system, not a static course website.

Psychology is the most mature subject implementation, while the same architecture is being extended across additional degree subjects. The platform itself lives separately from this portfolio site.

Open degreemargins.com ↗