A simple Student Database Management System combining a C++ backend and a static frontend.
Project Overview
- Description:: Minimal student database demo with a C++ program (
backend.cpp) that reads/writesdata.json, and a web frontend (frontend/) (HTML/JS/CSS) for interaction and display. - Language/Tech:: C++17, header-only
nlohmann/json(included underinclude/nlohmann/json.hpp), plain HTML/CSS/JavaScript for the frontend.
Quick Start
- Open Project:: Open the project folder at
c:\Users\Desktop\SDMSin your editor.
Prerequisites
- C++ Compiler::
g++(MinGW / GCC) or MSVC (cl). - Python (optional)::
pythonfor serving the frontend via a simple HTTP server (recommended for correct file/URL behavior). - Web Browser:: Modern browser (Chrome, Edge, Firefox).
Build & Run — Backend (PowerShell)
- Compile with g++:
cd C:\User\Desktop\SDMS
g++ -std=c++17 -I include -o backend.exe backend.cpp- Compile with MSVC (Developer Command Prompt / cl):
cd C:\Users\Desktop\SDMS
cl /EHsc /I include backend.cpp- Run backend:
.\backend.exeNotes:
- The project uses the header-only
nlohmann/jsonlibrary already present atinclude/nlohmann/json.hppso no extra package installation is required for JSON support. - The backend reads/writes
data.jsonin the project root. Ensure the process has write permissions to that file.
Run — Frontend
- Easiest: open
frontend/index.htmldirectly in a browser. - Recommended (serves files over HTTP):
cd C:\Users\Desktop\SDMS\frontend
python -m http.server 8000Then open http://localhost:8000/index.html in your browser.
Project Structure
backend.cpp: C++ backend program that manipulatesdata.json.data.json: The JSON data store for student records.frontend/:index.html: Frontend UI.app.js: Frontend JavaScript logic.style.css: Frontend styles.run.txt: (auxiliary file; inspect for notes)
include/nlohmann/json.hpp: Header-only JSON library used bybackend.cpp.
Data format
-
data.jsoncontains student records in JSON format. Open it to inspect or modify sample entries. The backend and frontend expect JSON objects/arrays — checkbackend.cppandfrontend/app.jsfor exact field names.
Troubleshooting
- Compiler errors about headers:: Ensure the
-I includeflag is used so the compiler findsnlohmann/json.hpp. - Frontend fetch/network errors:: Serving via
python -m http.serveravoids CORS/file:// restrictions. If opening the file directly causes issues, use the HTTP server. - Permission errors writing
data.json:: Run the backend from a directory where you have write access, or run your terminal as an elevated user if necessary.
Contributing
- Improvements: Add detailed build scripts, a small REST API, or a database-backed store.
- Please open an issue or submit a pull request describing changes.
License & Contact
- No license file included. Add one if you intend to publish.
- For questions, open an issue in the repo or contact the maintainer.
Anuj Rawat
Priyanka Saini
Simran Singh
Mahi Tandon
Khushi

