Skip to content

Latest commit

 

History

138 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live Demo

The backend uses a free hosting instance and may take a short time to wake up after inactivity.

Internship Workflow Management System (IWMS)

A prototype of the Internship Workflow Management System (IWMS) developed for the Hacettepe University Computer Engineering Department. This system aims to digitalize and manage the internship workflow by supporting authentication, internship report management, semester management, and supervisor verification processes.

Current Scope

The current prototype includes the following modules:

  • Authentication / Login
  • Internship Report Management
  • Internship Semester Management
  • Supervisor Request / Token / OTP Verification

Tech Stack

Frontend

  • React
  • Vite
  • Axios
  • React Router

Backend

  • Spring Boot
  • Spring Data JPA
  • Spring Security
  • JWT Authentication

Database

  • PostgreSQL

Containerization

  • Docker / Docker Compose

Project Structure

eternia/
├── docker-compose.yml
├── docs/
├── iwmsBackend/
└── iwmsFrontend/
  • iwmsBackend → Spring Boot backend
  • iwmsFrontend → React frontend
  • docker-compose.yml → PostgreSQL database container
  • docs → project documents and deliverables

Prerequisites

Before running the project, make sure the following are installed:

  • Git
  • Docker Desktop
  • Java 17
  • Node.js
  • npm

You can check them with:

git --version
docker --version
java --version
node --version
npm --version

How to Run the Project

After cloning the repository or pulling the latest changes, follow these steps carefully.

1. Go to the project root

cd eternia

2. Start the database

Make sure Docker Desktop is open.

Then run:

docker-compose up -d

To verify that the database container is running:

docker ps

3. Start the backend

Open a new terminal and run:

cd eternia/iwmsBackend
./mvnw spring-boot:run

The backend should run on:

http://localhost:8080

4. Start the frontend

Open another new terminal and run:

cd eternia/iwmsFrontend
npm install
npm run dev

The frontend should run on:

http://localhost:5173

Open that address in your browser.

Demo User Accounts

Student

  • Email: student@iwms.local
  • Password: 1234

Coordinator

  • Email: coordinator@iwms.local
  • Password: 1234

Admin

  • Email: admin@iwms.local
  • Password: 1234

Authentication

The project currently uses JWT-based authentication.

Authentication flow:

  1. User logs in with email and password
  2. Backend validates credentials
  3. Backend returns a JWT token
  4. Frontend stores the token
  5. Token is sent with protected requests using the Authorization: Bearer ... header
  6. Backend enforces authentication and role-based authorization

This means:

  • Unauthenticated users cannot access protected pages
  • Users can only access pages allowed for their role
  • Backend also enforces authorization rules

Available Pages by Role

Public

  • Home
  • Login
  • Company Registration
  • Supervisor Access

Student

  • Internship Reports
  • Supervisor Requests
  • Status Tracking
  • Help / Content

Coordinator / Admin

  • Semesters
  • Supervisor Requests
  • Internship Assessments

Admin

  • User Management
  • Company Registration Review
  • FAQ / Announcement Management

Main Features

1. Authentication

  • Login with seeded users
  • JWT-based authentication
  • Protected routes
  • Role-based page access

2. Internship Report Management

  • Create report draft
  • Update report draft
  • Delete report draft
  • Submit report
  • Real PDF file upload
  • Attendance and duration validation
  • Status tracking

3. Internship Semester Management

  • Create semester
  • Update semester
  • Deactivate semester
  • Delete semester
  • Overlap validation

4. Supervisor Request / Verification

  • Create supervisor request
  • Corporate email validation
  • Approve / reject request
  • Generate access token and OTP
  • Verify access with token and OTP

5. Supervisor Certification and Assessment

  • Supervisor token and OTP verification
  • Supervisor certification form submission
  • Certified report review by coordinator/admin
  • Final internship approval or rejection

6. Company Registration

  • Public company registration form
  • Corporate domain validation
  • Admin approval/rejection
  • Approved company domains can be used in supervisor verification flows

7. FAQ and Announcements

  • Create and manage FAQ/announcement content
  • Publish content for students

Testing

The project includes automated backend and frontend tests to verify the main internship workflow use cases and demo-critical flows.

Backend Tests

Backend tests are implemented with Spring Boot, JUnit, and Mockito.

To run all backend tests:

cd iwmsBackend
mvn test

The backend test suite covers the main use cases, including:

  • Authentication and login
  • User management
  • Internship report management and PDF upload validation
  • Status tracking
  • Supervisor request, token, and OTP verification
  • Supervisor certification
  • Internship semester management
  • Internship assessment
  • Company registration and approval
  • FAQ and announcement management

Frontend Unit and Component Tests

Frontend unit/component tests are implemented with Vitest and React Testing Library.

To run frontend tests:

cd iwmsFrontend
npm run test

These tests verify selected UI components, utility functions, and page-level behavior such as status timeline rendering and assessment page interactions.

Frontend End-to-End Tests

Frontend end-to-end tests are implemented with Playwright.

Before running E2E tests, make sure:

  1. Docker database is running.
  2. Backend is running on http://localhost:8080.
  3. Frontend dependencies are installed.

Start the backend in a separate terminal:

cd iwmsBackend
mvn spring-boot:run

Then run Playwright tests from the frontend folder:

cd iwmsFrontend
npm run e2e

The Playwright E2E suite covers demo-critical browser flows, including:

  • Public and protected route behavior
  • Authenticated login and role-based access control
  • Company registration and admin approval
  • Internship report PDF upload and submission
  • Supervisor request creation and coordinator token/OTP approval
  • Supervisor certification and coordinator assessment

Frontend Production Build Check

To verify that the frontend builds successfully:

cd iwmsFrontend
npm run build

Recommended Full Verification Before Demo

Before the final demo, run:

cd iwmsBackend
mvn test
cd iwmsFrontend
npm run e2e
npm run test
npm run build

All commands should pass before opening a merge request or presenting the demo.

Database Access

The database runs inside Docker.

To connect to PostgreSQL manually:

docker exec -it iwms-postgres psql -U iwms_user -d iwms

Useful PostgreSQL commands:

-- List tables
\dt

-- Show users
SELECT * FROM users;

-- Show internship reports
SELECT * FROM internship_reports;

-- Show internship semesters
SELECT * FROM internship_semesters;

-- Show supervisor requests
SELECT * FROM supervisor_requests;

-- Exit PostgreSQL shell
\q

Resetting the Database

If the database becomes messy or you want a clean start:

cd eternia
docker-compose down -v
docker-compose up -d

Then restart the backend:

cd iwmsBackend
./mvnw spring-boot:run

This removes old database data and recreates it from scratch.

How to Stop the Project

Stop frontend:

In the frontend terminal: press Ctrl + C

Stop backend:

In the backend terminal: press Ctrl + C

Stop database:

docker-compose down

Development Notes

Always pull the latest changes first:

git pull

If frontend dependencies changed:

cd iwmsFrontend
npm install

If backend dependencies changed, Maven wrapper will resolve them automatically when the backend starts.

If authentication or DB structure changed, resetting the Docker database may help:

docker-compose down -v
docker-compose up -d

Branching and Collaboration

Recommended workflow:

  1. Pull the latest changes
  2. Create or switch to your branch
  3. Make your changes
  4. Test locally
  5. Commit your changes
  6. Push your branch
  7. Open a merge request

Example:

git pull
git checkout your-branch-name
git add .
git commit -m "Your commit message"
git push

Team

Project team: eternia

Project: Internship Workflow Management System (IWMS)

Deployment

See DEPLOYMENT.md for the Vercel, Render, and PostgreSQL deployment configuration.

About

Full-stack Internship Workflow management system built with React and Java Spring Boot

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages