A terminal-based educational management system written in C.
EDU System is a simplified university management application that models the main academic workflows of students, faculty members, and educational administrators. It includes authentication, course management, course offerings, enrollment, grading, academic-calendar phases, surveys, and optional LMS features.
Project status: Final and stable course-project release.
- Overview
- Features
- Technical Highlights
- Requirements
- Getting Started
- First Run and Demo Data
- Demo Accounts
- Typical Academic Workflow
- Data Storage
- CSV Import Formats
- Resetting the Application
- Troubleshooting
- Project Structure
- Security and Scope
- Author
- License and Usage
This project was developed as a Fundamentals of Programming course project. Its purpose is to demonstrate how a relatively complex information system can be implemented in the C programming language using structured programming, file handling, validation, dynamic memory management, and role-based workflows.
The application provides three main workspaces:
- Administrator Console
- Faculty Portal
- Student Portal
The complete user interface runs inside the terminal.
- Separate login flows for students, faculty members, and the administrator
- Password recovery through predefined security questions
- Password confirmation when resetting credentials
- Limited authentication attempts
- Validation of usernames and account status
- View, search, register, and remove students
- View, search, register, and remove faculty members
- Add, search, and remove courses
- View and search course offerings by semester
- Add or remove students from an offering
- Increase offering capacity directly
- Review faculty requests
- Approve or reject:
- new course-offering requests
- offering-removal requests
- capacity-increase requests
- Manage academic-calendar phases:
- course offering
- unit selection
- classes and examinations
- grade recording
- Start the next semester after the current semester is completed
- View all personal offerings
- Browse courses and semester offerings
- Request a new course offering
- Request an offering removal
- Request an increase in course capacity
- View enrolled students
- Record grades individually
- Import grades from a CSV file
- View course-survey results and statistical summaries
- Publish and manage homework
- Publish and manage examinations
- Browse the course catalog
- Browse available offerings by semester
- Search courses and offerings
- Enroll in eligible offerings
- Withdraw from offerings
- View semester report cards
- View semester GPA and cumulative GPA
- Complete course surveys after grading
- View and answer homework
- View and answer examinations
- Manage PhD thesis information where applicable
The system validates several academic conditions, including:
- active academic-calendar phase
- offering capacity
- course prerequisites
- degree compatibility
- field and department compatibility
- duplicate enrollment prevention
- grade range validation
- PhD thesis and supervisor restrictions
- Written in C11
- Single-file implementation
- Cross-platform terminal handling for Windows and POSIX systems
- ANSI terminal colors with a plain-text fallback
- Persistent JSON-based storage
- Temporary, backup, and transaction-backup files
- Data validation during startup
- Recovery from reference and backup files
- Dynamic enrollment storage to reduce static memory use
- Transactional CSV grade import
- Historical offering snapshots for stable report cards
- Defensive input parsing and range checking
- Search functions with case-insensitive matching
You need:
- a C11-compatible compiler
- GCC, Clang, or MinGW-w64
- a terminal or console
- write permission in the directory where the program is executed
No third-party library is required.
git clone https://github.com/S-Ali-Sayyadi/EDU_System_C.git
cd EDU_System_Cgcc -std=c11 -Wall -Wextra -Wpedantic -O2 edu_system.c -o edu_system -lmclang -std=c11 -Wall -Wextra -Wpedantic -O2 edu_system.c -o edu_system -lmgcc -std=c11 -Wall -Wextra -Wpedantic -O2 edu_system.c -o edu_system.exe -lm./edu_system.\edu_system.exeedu_system.exeWhen the application starts, it tries to load the previously saved data.
If no valid application data exists, the program automatically creates a sample educational dataset and saves it in the current working directory. This allows the system to be tested immediately after compilation.
For this reason, run the program from a directory in which it is allowed to create and update files.
The automatically generated sample data includes the following accounts:
| Role | Username | Password |
|---|---|---|
| Administrator | admin |
admin123 |
| Student | 404123456 |
123456 |
| Faculty member | FCS105 |
123456 |
Additional sample students and faculty members are also generated during the first run.
These credentials are only intended for local demonstration and testing.
The main workflow of the system follows these stages:
- The administrator starts the course-offering phase.
- Faculty members submit requests to offer courses.
- The administrator approves or rejects the requests.
- The administrator starts the unit-selection phase.
- Eligible students enroll in available offerings.
- The administrator starts the classes and examinations phase.
- Faculty members publish learning activities and examinations.
- The administrator starts the grade-recording phase.
- Faculty members record student grades.
- Students view report cards and submit course surveys.
- After all required stages are completed, the administrator starts the next semester.
Some stages may overlap, but their required order is enforced by the application.
The program stores its state in JSON files in the current working directory.
| File | Purpose |
|---|---|
edu_data.json |
Main combined application state |
students.json |
Student reference data |
faculty.json |
Faculty reference data |
courses.json |
Course reference data |
offerings.json |
Offering and enrollment data |
requests.json |
Academic requests |
calendar.json |
Current semester and calendar phases |
edu_bonus.json |
LMS and bonus-feature data |
The program may also create:
.tmpfiles during writes.bakbackup files.txn.baktransaction-backup files
Do not manually edit these files while the program is running.
Runtime data files should not be committed to Git because they may contain account information, grades, security answers, and other local test data.
The application supports three CSV-based import operations:
- bulk student registration by the administrator
- bulk faculty registration by the administrator
- bulk grade entry by a faculty member
CSV files must use a comma (,) as the delimiter. The header row is optional,
but using the exact headers below is strongly recommended. UTF-8 files are
recommended, and a UTF-8 BOM at the start of the file is accepted.
Blank lines are ignored. Every required field must contain a value. When a value contains a comma, a line break, or a double quote, enclose it in double quotes. A double quote inside a quoted value must be written twice.
Example:
"A thesis title, with a comma","A value containing ""quoted text"""Relative and absolute file paths are accepted when the application asks for the CSV file path.
Menu path:
Administrator -> Student Management -> Import students from CSV
Use exactly 14 columns in the following order:
first_name,last_name,student_id,national_code,field,entrance_year,section,mentor,department,answer_birth,answer_school,answer_book,answer_bike,passwordExample:
first_name,last_name,student_id,national_code,field,entrance_year,section,mentor,department,answer_birth,answer_school,answer_book,answer_bike,password
Arman,Moradi,405700001,9012345678,Computer Engineering,405,BSc,Nima Rahimi,Computer Engineering,Tehran,Danesh School,The Little Prince,Blue,123456
Sara,Karimi,404700002,9234567890,Computer Engineering,404,MSc,Nima Rahimi,Computer Engineering,Isfahan,Farhang School,1984,Black,123456PhD records must use exactly 17 columns. The last three fields are required for the thesis:
first_name,last_name,student_id,national_code,field,entrance_year,section,mentor,department,answer_birth,answer_school,answer_book,answer_bike,password,thesis_title,thesis_abstract,thesis_citationsExample:
first_name,last_name,student_id,national_code,field,entrance_year,section,mentor,department,answer_birth,answer_school,answer_book,answer_bike,password,thesis_title,thesis_abstract,thesis_citations
Roya,Ahmadi,402700003,9345678901,Computer Engineering,402,PhD,Nima Rahimi,Computer Engineering,Shiraz,Shahid Beheshti School,The Alchemist,Green,123456,Secure Academic Systems,"A study of secure, file-based academic systems",0Student import rules:
- The number and order of columns must match one of the formats above.
student_idmust contain digits only.national_codemust contain exactly 10 digits.entrance_yearmust be a positive integer.sectionis case-sensitive and must be exactlyBSc,MSc, orPhD.- Student IDs, faculty IDs, and national codes must remain unique across the system.
- All security-answer fields and the password are required.
- For a PhD student,
mentormust exactly match the full name of an active, already registered faculty member. - For a PhD student,
thesis_titleandthesis_abstractcannot be empty, andthesis_citationsmust be a non-negative integer. - Duplicate or invalid records are skipped and reported after the import.
Import faculty members before importing PhD students so that each PhD mentor can be resolved successfully.
Menu path:
Administrator -> Faculty Management -> Import faculty from CSV
Faculty files must use exactly 13 columns in this order:
first_name,last_name,faculty_id,national_code,field,entrance_year,degree,department,password,answer_birth,answer_school,answer_book,answer_bikeExample:
first_name,last_name,faculty_id,national_code,field,entrance_year,degree,department,password,answer_birth,answer_school,answer_book,answer_bike
Nima,Rahimi,FCS220,8901234567,Computer Engineering,399,PhD,Computer Engineering,123456,Tehran,Danesh School,1984,Black
Maryam,Sadeghi,FEE221,8456789012,Electrical Engineering,398,PhD,Electrical Engineering,123456,Tabriz,Farhang School,The Little Prince,BlueFaculty import rules:
- Exactly 13 non-empty fields are required for every record.
faculty_idmay be alphanumeric.national_codemust contain exactly 10 digits.entrance_yearmust be a positive integer.- Faculty IDs, student IDs, and national codes must remain unique across the system.
degree,field, anddepartmentmust not be empty.- All security-answer fields and the password are required.
- Duplicate or invalid records are skipped and reported after the import.
Menu path:
Faculty -> My Offerings -> Select Offering -> Record Grades -> Import grades from CSV
Grade files use exactly two columns:
student_id,gradeExample:
student_id,grade
404123456,18.25
403234567,16Grade import rules:
student_idmust belong to a student enrolled in the selected offering.grademust be a valid number from0through20.- The selected offering must belong to the logged-in faculty member.
- The offering must belong to the current semester.
- The grade-recording calendar phase must be active.
- Invalid records and students not enrolled in the offering are skipped and reported.
- If a student appears more than once, the last valid grade in the file is the value applied.
For a clean data setup, use this order:
1. Import faculty members
2. Import BSc and MSc students
3. Import PhD students
4. Create or approve course offerings
5. Enroll students
6. Import grades during the grade-recording phase
Warning: Resetting permanently deletes locally saved application data.
Close the program before deleting any data files.
rm -f edu_data.json* students.json* faculty.json* courses.json* \
offerings.json* requests.json* calendar.json* edu_bonus.json*Remove-Item edu_data.json*, students.json*, faculty.json*, courses.json*, `
offerings.json*, requests.json*, calendar.json*, edu_bonus.json* `
-ErrorAction SilentlyContinueRun the application again to regenerate the sample dataset.
Install a C compiler:
- Linux: GCC or Clang through the system package manager
- macOS: Xcode Command Line Tools
- Windows: MinGW-w64 or MSYS2
Make sure -lm is placed at the end of the compile command:
gcc -std=c11 -O2 edu_system.c -o edu_system -lmUse a terminal with ANSI escape-sequence support. The application falls back to plain text when terminal-color support is unavailable.
Run it from a directory where your user account has write permission.
Do not overwrite the files immediately. Check the corresponding .bak and
.txn.bak files first. If the stored data is not needed, follow the reset
instructions above.
Increase the terminal width and use a monospaced font.
EDU_System_C/
├── .gitignore
├── README.md
└── edu_system.c
The application generates its JSON data and backup files at runtime.
This application is an educational project, not a production university system.
Important considerations:
- The default administrator credentials are hardcoded for demonstration.
- Demo usernames and passwords are publicly documented.
- Runtime data is stored locally.
- The application should not be used with real personal or academic data.
- Production deployment would require stronger authentication, access control, encryption, auditing, database storage, and security review.
Ali Sayyadi
GitHub: S-Ali-Sayyadi
No open-source license has been granted for this repository.
The source code is publicly visible for educational review and portfolio purposes. Public visibility does not make this project open source.
Unless the copyright holder gives prior written permission, no permission is granted to:
- reproduce or republish the source code
- modify and redistribute the source code
- include the source code in another project
- submit the source code, or substantial parts of it, as academic work
- sell, sublicense, or commercially distribute the source code
GitHub users may view the repository and use GitHub's built-in forking functionality subject to GitHub's Terms of Service.
For permission requests, contact the repository owner.
Copyright © 2026 Ali Sayyadi. All rights reserved.