The frontend of the project is a React + TypeScript single-page application (SPA) that provides the user interface for managing tasks, teams, and user accounts. It communicates exclusively with the backend microservices through an Nginx reverse proxy that routes /api/*
requests to the appropriate services.
The main goals of the frontend are:
frontend/
├── src/
│ ├── api/ # HTTP clients for backend services
│ │ ├── auth.ts
│ │ ├── team.ts
│ │ ├── task.ts
│ │ └── http.ts
│ ├── layouts/ # Shared layout wrappers
│ │ ├── AppLayout.tsx
│ │ └── AuthLayout.tsx
│ ├── pages/ # Page-level components
│ │ ├── LoginPage.tsx
│ │ ├── RegisterPage.tsx
│ │ ├── WelcomePage.tsx
│ │ ├── tasks/
│ │ │ ├── TasksPage.tsx
│ │ │ ├── DetailedTaskPage.tsx
│ │ │ └── CompletedPage.tsx
│ │ ├── teams/
│ │ │ ├── TeamsPage.tsx
│ │ │ ├── CreateTeamPage.tsx
│ │ │ ├── TeamTasksPage.tsx
│ │ │ └── TeamsDetailedPage.tsx
│ │ └── admin/
│ │ ├── UsersAdminPage.tsx
│ │ ├── TeamsAdminPage.tsx
│ │ └── TeamAdminDetailPage.tsx
│ ├── realtime/ # WebSocket logic
│ │ ├── ws.ts
│ │ ├── useRealtime.ts
│ │ └── RealtimeRoot.tsx
│ ├── routes/ # Auth guards
│ │ ├── RequireAuth.tsx
│ │ └── RequireAdmin.tsx
│ ├── App.tsx # Router and app root
│ └── main.tsx # Entry point
├── package.json
├── tsconfig.json
└── vite.config.ts
http.ts
A thin wrapper around Axios.
import axios from "axios";
export const http = axios.create({
baseURL: "/api",
headers: { "Content-Type": "application/json" },
});
auth.ts
Handles authentication calls to /api/auth/*
.
login(credentials)
– POST /auth/login.register(credentials)
– POST /auth/register.localStorage
.team.ts
Handles team management.
createTeam(input)
– create a new team.getTeamById(id)
– fetch team details.listUserTeams(userId)
– get all teams for a given user.listTeamMembers(teamId)
– get members of a team.updateTeam(id, patch)
– change team name/description.deleteTeam(id)
– delete a team.adminAddMember(teamId, userId, role)
– add user by ID.adminRemoveMember(teamId, userId)
– remove member.task.ts
Handles task CRUD.
listMyTasks()
– list all tasks assigned to current user.listTasksForTeam(teamId)
– list all tasks in a team.createTaskInTeam(teamId, input)
– create new task.getTask(id)
– fetch single task.updateTask(id, patch)
– update fields of a task.deleteTask(id)
– delete a task.setAssignee(id, userId)
– assign task to member.setCompleted(id, completed)
– mark task done/undone./welcome
.The router is defined in App.tsx
with React Router v6.
/
→ Login page./register
→ Register page./welcome
→ Welcome dashboard./teams
→ List of teams./teams/new
→ Create new team./teams/:id
→ Team tasks./teams/:id/manage
→ Manage team (members, settings)./tasks
→ My tasks./tasks/:id
→ Detailed task view./completed
→ Completed tasks./admin/*
→ Admin-only pages.Auth guards:
RequireAuth
ensures token is set.RequireAdmin
ensures user has admin role.Implemented via WebSockets:
/ws
after login.Subscribes to events such as:
task.created
task.updated
task.deleted
task.completed
/api/tasks/*
caused 400/405 errors.The frontend demonstrates a working multi-service React application that connects to several backend services via Nginx. Despite unresolved issues, the architecture is extensible and provides a clear separation of concerns.
The project highlights both the strengths of modern SPA development and the challenges of microservice integration under real-world constraints.
\newpage