A full‑stack web application for managing internship programs: task tracking, quizzes, analytics, notifications, and role‑based access for Admins, Managers, Trainers, and Interns.
InternProgressTracker.sln
intern-progress-tracker-ui/ # React + TypeScript + Vite frontend
InternProgressTracker.API/ # ASP.NET Core Web API backend (NET 8)
InternProgressTracker.Domain/ # Domain models
InternProgressTracker.Application/ # Application layer (DTOs, mapping)
- Frontend: React 19, TypeScript, Vite, Bootstrap 5, Axios, Chart.js, React Router
- Backend: ASP.NET Core 8 Web API, Entity Framework Core, AutoMapper, JWT Auth
- Database: SQL Server LocalDB (dev default)
- Node.js 18+ and npm
- .NET SDK 8.0+
- SQL Server (LocalDB for development is fine)
cd InternProgressTracker.API
dotnet restore
dotnet build
dotnet runDefaults (from Properties/launchSettings.json and appsettings.json):
- API URL:
http://localhost:5192 - Swagger:
http://localhost:5192/swagger - DB:
Data Source=(localdb)\\MSSQLLocalDB; Initial Catalog=InternProgressTrackerDb
The app seeds roles and an initial admin on startup (see Seed Data below).
cd intern-progress-tracker-ui
npm install
npm run devDefaults:
- Dev server:
http://localhost:5173 - API base URL (configured in code/env):
http://localhost:5192/api
Open the app in your browser. You should be able to navigate to the login page and sign in with the seeded admin.
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=InternProgressTrackerDb;Integrated Security=True;Encrypt=False;Trust Server Certificate=True"
},
"Jwt": {
"Key": "dev-secret-key-change-in-production-please",
"Issuer": "InternProgressTracker",
"Audience": "InternProgressTracker.Client"
},
"Admin": {
"Email": "[email protected]",
"Password": "Admin@12345"
}
}- Update the connection string for your SQL Server instance in non‑dev environments.
- Replace the JWT
Keyin production.
- CORS policy
AllowReactAppallows:http://localhost:5173,http://localhost:5174
intern-progress-tracker-ui/src/lib/api.ts uses an env override:
baseURL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:5192/api'Optional .env in intern-progress-tracker-ui/:
VITE_API_BASE_URL=http://localhost:5192/api- JWT bearer authentication with role‑based authorization.
- Seeded roles: Admin, Manager, Trainer, Intern.
- Seeded admin (dev defaults):
- Email:
[email protected] - Password:
Admin@12345
- Email:
POST /register(Admin only) – create a user with a rolePOST /login– returns{ accessToken, user }GET /profile(Auth) – current user profilePUT /profile(Auth) – update display name and password- Admin management:
GET /usersGET /users/{role}PUT /users/{userId}DELETE /users/{userId}
Frontend automatically attaches the JWT from localStorage.token and handles 401s by redirecting to /login (see src/lib/api.ts).
- Scripts (
intern-progress-tracker-ui/package.json):npm run dev– Vite dev servernpm run build– TypeScript build then Vite buildnpm run preview– preview production buildnpm run lint– ESLint
- Styling: Bootstrap 5 and custom CSS inside components as needed.
- Routing:
react-router-dom.
- Swagger enabled in Development at
/swagger. - AutoMapper profile from
InternProgressTracker.Application.MappingProfile. - JSON options configured for enum strings and DateTime handling (
DateTimeConverter).
Migrations already exist in InternProgressTracker.API/Migrations. Typical commands if you need to update the schema:
cd InternProgressTracker.API
dotnet ef migrations add <Name> # requires dotnet-ef tool installed
dotnet ef database updateInstall EF tools if needed:
dotnet tool install --global dotnet-ef- Start API (port 5192):
cd InternProgressTracker.API
dotnet run- Start UI (port 5173):
cd intern-progress-tracker-ui
npm run dev- Configure API URL for UI if non‑default:
# in intern-progress-tracker-ui/.env
VITE_API_BASE_URL=http://localhost:5192/api- Backend: publish as a self‑contained or framework‑dependent deployment
cd InternProgressTracker.API dotnet publish -c Release -o ./publish - Frontend: build static assets
cd intern-progress-tracker-ui npm run build - Serve frontend via your chosen web server and point it to the API base URL.
- CORS errors: Ensure UI origin (
5173/5174) is allowed by the API and that the API is reachable atVITE_API_BASE_URL. - 401 Unauthorized: Verify JWT config and that you are logged in; the UI will redirect to
/loginon 401. - Database connection: Update
ConnectionStrings:DefaultConnectionfor your SQL Server instance. - Port conflicts: Adjust API port in
launchSettings.jsonor run with--urls http://localhost:<port>.
- API
dotnet restore,dotnet build,dotnet rundotnet publish -c Release
- UI
npm run dev,npm run build,npm run preview,npm run lint
Controllers/– REST endpoints (Auth, Users, Assignments, Tasks, Analytics, Notifications, Quizzes)Services/– business logic and data access servicesData/InternProgressTrackerDbContext.cs– EF Core DbContextProfiles/MappingProfile.cs– AutoMapper configurationModels/– API models and seed helpers (e.g.,SeedData.cs,ApplicationUser.cs)Migrations/– EF Core migrationsProgram.cs– app startup, DI, CORS, JWT, Swagger
src/pages/– pages (e.g.,HomePage.tsx)src/components/– shared UI components (Navbar, Sidebar, ProtectedRoute, etc.)src/context/AuthContext.tsx– auth state and providersrc/lib/api.ts– Axios instance with JWT injection and 401 handlingsrc/utils/– helpers (e.g., date utilities)public/– static assets (/images/fnf_png.png)
- Replace the development JWT key and admin credentials before deploying.
- Store secrets outside of source control (environment variables, secret managers, or secure config stores).