Skip to content

About

This is a student management application written in Java and Flutter. The Java part is my responsibility and the Flutter part is my colleague's responsibility.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

Student Management System (Java Backend + Flutter Frontend)

A student management application with a Java backend (TCP server + file-based persistence) and a Flutter frontend.

The backend exposes a simple command-based protocol over a TCP socket. The Flutter client (UI) uses this protocol to implement student workflows such as authentication, profile viewing, course selection, assignments, and personal task management.

Note: The ZIP attached in this repository contains the Java backend source files only (no Flutter code was present in the uploaded archive). The Flutter app requirements/specification are documented in the provided PDF. fileciteturn0file0


Features

Flutter Frontend (requirements/spec)

The Flutter application should provide (at minimum):

  • Login / Sign up with validation and proper error feedback (e.g., toast/snackbar style notifications). fileciteturn0file0
  • Profile page: show and edit user information. fileciteturn0file0
  • Home with a simple dashboard and navigation to other pages. fileciteturn0file0
  • Calendar / tasks: add tasks with date/time and local notifications. fileciteturn0file0
  • Courses / classes: list available classes, display details, and allow selecting/taking courses. fileciteturn0file0
  • News / web content: show a web page inside the app via WebView. fileciteturn0file0
  • Assignments: list assignments, view deadlines/status, and mark as done. fileciteturn0file0

Java Backend (this repository)

Implemented server-side capabilities (based on current source code):

  • TCP server listening on port 8080
  • Null-terminated request framing (client sends a command string ending with byte 0)
  • Command parsing with ~ as the field delimiter
  • File-based storage under a configured data directory (currently hard-coded Windows paths)
  • Supported commands:
    • login
    • sign in
    • viewProf
    • delete account
    • changePass
    • viewSara
    • myCourses
    • takeCourse
    • viewCourses
    • assignments
    • doAssignment
    • addWork
    • doWork
    • deleteWork
    • viewWorks

Architecture

Flutter App  <---- TCP (8080) ---->  Java Server (Server.java)
   UI + UX                               |
   pages (login, ...)                    |
                                          -> File-based persistence (txt files)
  • The backend uses ServerSocket and spawns a ClientHandler thread per connection.
  • Each connection handles one command, sends a response, then closes the socket.

Communication Protocol

Request framing

  • The client writes the command string byte-by-byte and ends it with a null byte (\0).
  • The server reads until it reaches 0 and treats the collected bytes as the command string.

Command format

Requests use ~ as a separator:

  • login~<studentId>~<password>
  • sign in~<studentId>~<password>~<fullName>
  • viewProf~<studentId>
  • changePass~<studentId>~<newPassword>
  • ...

Responses

  • Some endpoints return status codes as plain text, e.g. 200, 401, 404.
  • Some endpoints return data separated by ~.

Known data response formats from the server implementation:

  • viewProf → fullName~totalUnits~average
  • viewSara → assignmentCount~highestGrade~lowestGrade
  • assignments → repeated groups of courseName~deadline~status separated by ~
  • myCourses / takeCourse → ~-separated course details (teacher name, units, assignments count, ...)

Persistence (Data Files)

The backend currently uses hard-coded Windows paths such as:

  • D:\University\AP\project\project files\Student info.txt
  • D:\University\AP\project\project files\teachers\...
  • D:\University\AP\project\project files\courses\...
  • D:\University\AP\project\project files\assignments\...

Recommended improvement

Replace hard-coded absolute paths with:

  • a relative path (e.g., ./data/...), or
  • a configurable base path via environment variable / config file.

This makes the project runnable on any OS and easier to deploy.


Running the Backend (Java)

1) Prerequisites

  • JDK 17+ (or JDK 11+ should also work if no newer APIs are used)

2) Compile

From the directory containing the .java files:

javac *.java

3) Run the server

java Server

The server listens on localhost:8080.


Flutter Frontend (high-level)

Because the Flutter source code is not included in the uploaded archive, the recommended structure is:

  • A flutter/ folder (or separate repository) containing the Flutter app
  • A TCP client service that:
    1. connects to the server,
    2. sends the null-terminated command string,
    3. reads the response until EOF (since the server closes the connection after responding)

Project Roadmap (based on provided spec)

The PDF describes a phased delivery plan and UI requirements (login/signup, profile, calendar with notifications, courses, assignments, webview, etc.). fileciteturn0file0


Troubleshooting

  • Server runs but requests fail: ensure the server data directory exists and file paths are correct.
  • Connection issues: confirm port 8080 is free and firewall rules allow local connections.
  • Cross-platform issues: replace D:\... paths with relative paths or a configurable base directory.

Authors

Mahan Baneshi (Backend part) & Mohammad Mahdi Arjmandnia (Frontend part)

Course project (Advanced Programming) — Java backend + Flutter frontend.

About

This is a student management application written in Java and Flutter. The Java part is my responsibility and the Flutter part is my colleague's responsibility.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages