Semester project - fidransky/kiv-pia-labs GitHub Wiki
We'll implement a small web app for damage reporting to an insurance company.
Business Analysis
Actors
- insurance company investigator
- insured (bicycle)
- impaired (motorbike)
Use cases
- insured reports the damage
- investigator requests relevant documents
- insured uploads relevant documents
- impaired uploads relevant documents
- investigator approves uploaded documents
- investigator approves/rejects reported damage
- insured/impaired communicates with the investigator via chat/email
Technical Analysis
Entities
User:
- id: uuid
- name: alphanumeric string
- emailAddress: alphanumeric string; unique
- role: INSURED, IMPAIRED, INVESTIGATOR
Damage:
- id: uuid
- insured: uuid
- impaired: uuid
- timestamp: datetime
- location: coordinates (longitude and latitude)
- description: string
- state: STARTED, PROCESSING, APPROVED, REJECTED, CLOSED
Document:
- id: uuid
- damage: uuid
- timestamp: datetime
- description: alphanumeric string
- state: REQUESTED, UPLOADED
- data: blob
Data Hierarchy
- User -> Damage (1:N): Same User may report many damages in time. Same User may act as both impaired and insured in many reported damages.
- Damage -> Document (1:N): There is usually many Documents uploaded to a single Damage.
Authorization
Each user role is authorized to do a different set of tasks.
Anonymous:
- log in
- check damage state by unique ID
Insured:
- view a list of reported damage
- report new damage
- check damage state
- upload requested documents to existing damage
- communicate with the damage investigator
Impaired:
- check damage state
- upload requested documents to existing damage
- communicate with the damage investigator
Investigator:
- see a list of unresolved reported damage
- request documents for reported damage investigation
- approve uploaded documents
- approve/reject reported damage
- communicate with insured/impaired
Features
Service provides web UI (server-side or client-side, we'll discuss both during the labs).
Service provides API (REST or GraphQL, we'll discuss both during the labs) described by API documentation.
Service enables User communication via WebSockets.
Web UI is translated to English and one more language, it allows switching languages easily.
Users can log in using two authentication methods (username/password, OAuth, Kerberos, WebAuthn, OTP, ...).
Deployment and Maintenance
Service can be run with one command, preferably using Docker Compose.
Allowed Technology
If I've heard of it, it's allowed.
For dynamically typed languages with optional type system, using types is mandatory. That is: Node.js with Typescript, PHP with type declarations etc.
Preferred stack: JDK 21, Maven, Spring Boot 3, MySQL, JavaScript
Implementation Requirements
- Correct implementation of selected architecture
- Correct separation of application layers
- Reasonably long methods (typically 50-100 lines, exceptions allowed)
- Well-commented methods/functions, data models, attributes
- Logs written where appropriate and structured (log levels, common format)
- Damage management module covered with automated tests (unit, integration)
- Configurations must be read from property files, environment variables etc.
Evaluation
50 points maximum, subtracting points for any violation of requirements.
Submission
Submit your semester projects to Courseware, due date is 31 January 2025.