Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shubhamd99/car-stolen-report-app
Car Stolen Report App
https://github.com/shubhamd99/car-stolen-report-app
express nodejs reactjs typescript
Last synced: about 1 month ago
JSON representation
Car Stolen Report App
- Host: GitHub
- URL: https://github.com/shubhamd99/car-stolen-report-app
- Owner: shubhamd99
- Created: 2020-03-24T13:21:31.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T02:09:02.000Z (about 2 years ago)
- Last Synced: 2024-11-11T12:15:37.361Z (3 months ago)
- Topics: express, nodejs, reactjs, typescript
- Language: TypeScript
- Homepage:
- Size: 5.32 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stolen Cars Complain App
## Note: Authentication is not added, only API Endpoints are there
Since Authentication is not there i'm displaying as two different page one for complains and other for police login
* http://localhost:8000/home
* http://localhost:8000/police/123Run the project --> npm run dev
## Workflow:
1. On Login of the Officer we are assigning the un-assigned complains to his bucket in the backend.
2. On Creating complains we are checking the officers that are online and not having a complain assined already, then we are assigning the complain to that officer.
3. When we change the complain status to completed, we are un-assigning that complain from the officer making his bucket empty for other cases.## Proposed Solution
We can create lambda in AWS that will trigger after some interval by the cron, that will take care of this assigning and unassigning of the complains.### API Endpoints
```
/api/signin
/api/register
/api/logout/api/:id
/api/complains
/api/complain
/api/complains/:id
/police/assign/:id
```### Database Schema
```
CREATE extension "uuid-ossp";CREATE TABLE IF NOT EXISTS complains (
id uuid NOT NULL DEFAULT uuid_generate_v4(),
car_model text NOT NULL,
customer_name VARCHAR(100) NOT NULL,
customer_phone_number text NOT NULL,
notes jsonb,
is_completed BOOLEAN DEFAULT FALSE NOT NULL,
created_at TIMESTAMP without time zone NOT NULL,
CONSTRAINT complains_pkey PRIMARY KEY ( id )
);CREATE TABLE IF NOT EXISTS users (
id uuid NOT NULL DEFAULT uuid_generate_v4(),
name VARCHAR(100),
email text UNIQUE NOT NULL,
hash VARCHAR(100) NOT NULL,
created_at TIMESTAMP without time zone DEFAULT now() NOT NULL,
CONSTRAINT users_pkey PRIMARY KEY ( id ),
fk_complains_id uuid references complains (id)
);DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS complains;
```
* To change the complain status we have to click on yellow button
* To Assign and Unassign complains, we have to click on Pickup/Unassign button

Card CSS - https://codepen.io/alvaromontoro/pen/ebPEWb
Profile Card CSS - https://codepen.io/msichterman/pen/zVmEpG
Barebones - https://github.com/covalence-io/barebones-react-typescript-express