https://github.com/bankole2000/basic-zod-project
https://github.com/bankole2000/basic-zod-project
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bankole2000/basic-zod-project
- Owner: Bankole2000
- Created: 2022-04-04T00:05:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-04T00:07:00.000Z (over 4 years ago)
- Last Synced: 2025-06-06T20:29:02.837Z (about 1 year ago)
- Language: TypeScript
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lugah Schedule Demo Service
REST API for collection of contact information and demo presentation requests
Built with:
1. Node JS
2. TypeScript
3. Express
4. Prisma
5. PostgreSQL
6. Deployed to heroku
### Types
```js
type Contact = {
id?: string | number,
email: string,
firstname: string,
lastname: string,
phone?: string,
company?: string,
industry?: string,
location: string,
scheduledDemos: ScheduledDemo[],
createdAt?: DateTime,
updatedAt?: DateTime,
}
type ScheduledDemo = {
id?: string | number,
requestedDate: DateTime,
template?: string,
moreInfo?: string,
contact: Contact[],
createdAt?: DateTime,
updatedAt?: DateTime
}
```
### API Base URL
Is currently running at - [https://lugahfront.herokuapp.com/](https://lugahfront.herokuapp.com/)
### End points
| Method | Path | Data | Response |
| ------ | ---------------- | ---------------------------------- | ------------------------------------------- |
| GET | "/" | null | Returns JSON object with some api meta data |
| GET | "/contacts" | null | Returns all Contacts in database |
| POST | "/contacts" | contact: Contact | Returns created Contact item |
| GET | "/contacts/:contactId" | {params: id} | Returns single contact of id :id |
| PATCH | "/contacts/:contactId" | {params: id} todo fields to update | Returns updated contact |
| DELETE | "/contacts/:contactId" | {params: id} | Returns deleted contact of id :id |
| GET | "/schedule-demo" | null | Returns all Scheduled Demos in database |
| POST | "/schedule-demo" | scheduled Demo Item: ScheduledDemo | Returns created demo Schedule Request item |
| GET | "/schedule-demo/:scheduleId" | {params: id} | Returns single Schedule Request item of id :scheduleId |
| PATCH | "/schedule-demo/:scheduleId" | {params: id} ScheduledDemo fields to update | Returns updated Schedule Request item |
| DELETE | "/schedule-demo/:scheduleId" | {params: id} | Returns deleted Schedule Request item of id :scheduleId |