The Injury Tracking System is a web application designed for organizations, such as the police, to record and track injuries reported by individuals. It offers features for creating, viewing, updating, and deleting injury reports, along with a unique functionality of pinpointing injuries on a body map. The application aims to provide a user-friendly interface for efficient injury management.
- Users can create, view, update, and delete injury reports.
- Injury reports include the reporter's name, date & time of injury.
- Body map functionality allows users to select different areas of injury with automatic labeling.
- Users can provide details of injuries for each selected area.
- A table displays injury reports with information such as name, date & time of injury, and date of the report.
- Users can sort reports by various fields.
- Searching through the reports is supported.
- Filtering by start and end dates for report is available.
- Users can register with a username and password.
- Authentication options include Google login and email login using Auth0.
- Users can log in, log out of the application.
- The application has a clean and responsive interface.
- Ant design libraries are used for a visually appealing design.
- The design is optimized for both desktop and mobile devices.
- The application is built as a fully responsive PWA.
- Offline functionality is enabled for a seamless user experience.
- Injury areas on the body map are automatically labeled based on detection.
- An analytics dashboard with visualizations of relevant metrics has been implemented.
- Next.js with Ant design library.
- Prisma as the ORM.
- PostgreSQL database.
- Auth0 for user authentication, Google login, and email login.
- Chart.js for data visualization.
- Service workers and other PWA features are implemented.
- Clone the repository:
git clone https://github.com/deeksharungta/injury-tracking-system.git
- Navigate to the project directory:
cd injury-tracking-system
- Install dependencies:
npm install
- Set up environment variables.
- DATABASE_URL
- AUTH0_SECRET
- AUTH0_BASE_URL
- AUTH0_ISSUER_BASE_URL
- AUTH0_CLIENT_ID
- AUTH0_CLIENT_SECRET
- Run the application:
npm run dev
The application is deployed on Vercel.
The codebase is organized as follows:
-
/components: React components used throughout the application.
- BarGraph.tsx
- Form.tsx
- Header.tsx
- InjuriesReported.tsx
- Layout.tsx
- PieChart.tsx
- SideBar.tsx
- Table.tsx
- Modal.tsx
-
/pages: Next.js pages for different routes.
- /api: Backend APIs
- /dashboard:
- index.tsx
- /reports:
- index.tsx
- [id].tsx
- create.tsx
- update/[id].tsx
-
/prisma: Schema model and migrations files.
-
/public: Public assets.
-
/styles: Stylesheets for styling components.
-
.env: Environment configuration file