Skip to content

Commit

Permalink
event-service-documentation (#7)
Browse files Browse the repository at this point in the history
* event-service-doc

* resolved comments

* resolved comments

* Update 1_about.md

* Update 8_devops.md

---------

Co-authored-by: Manoj L <[email protected]>
  • Loading branch information
poojakarma and manojLondhe authored Oct 7, 2024
1 parent 8e4e27d commit 2b39d3f
Show file tree
Hide file tree
Showing 11 changed files with 671 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/event-service/1_about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_position: 1
---

# About

The event service allows users to schedule and manage both online and offline events with comprehensive details. The service is versatile, supporting various event types and providing users with the ability to create and customize events with specific attributes and preferences.

For offline events, users can provide details such as the physical location, latitude, and longitude. For online events, users can set any created meeting links like Zoom, Google Meet by passing the relevant details in the onlineDetails object.

Key attributes of an event include the title, short description, and detailed description. The service currently supports the private event type.

Additionally, the service supports both single events and recurring events. For recurring events, users can set a weekly pattern, allowing them to choose specific days over multiple weeks. Events are highly customizable, with editable fields such as start date, end date, and recurrence patterns. The service also supports the inclusion of event metadata for further customization.
44 changes: 44 additions & 0 deletions docs/event-service/2_features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
sidebar_position: 2
---

# Features

Following are the key features

#### 1. Online and Offline Event Scheduling:

- Online and Offline Events: Manage and schedule both online events (e.g., Zoom, Google Meet) and offline events with physical locations.

#### 2. Online Event Integration:

<!-- - Provider Options: Integrate with platforms like Zoom and Google Meet. -->

- Meeting Links: Generate and manage custom meeting links through onlineDetails.

#### 3. Recurring Event Scheduling:

- Weekly Recurrence:: Enables setting up recurring events with flexible patterns, such as weekly schedules.
- Customizable Recurrence: Users can select specific days of the week and define recurrence patterns over multiple weeks.

#### 4. Event Customization:

- Editable Fields: Includes start date, end date, and recurrence patterns.

- Metadata Support: Allows for additional customization and details through event metadata.

#### 5. Filters:

**Users can filter events by**:

- Event type (online or offline)

- Start date or end date

- Event title

- Event status

- cohortId

- Created by
28 changes: 28 additions & 0 deletions docs/event-service/3_getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
sidebar_position: 3
---

# Getting Started

Before setting up the event service, ensure you have the following prerequisites

### Prerequisites

- [Node.js] - Version 20 or later
- [NestJS] - Familiarity with NestJS framework
- [PostgreSQL] - Database for storing event data

[//]: #
[Node.js]: http://nodejs.org
[NestJS]: https://docs.nestjs.com
[PostgreSQL]: https://www.postgresql.org/

### Setting Up Locally

Follow these steps to set up the event service on your local machine:

1. **Install Node.js**
If you haven’t already installed Node.js, download it from the [Node.js official website](http://nodejs.org). Follow the installation instructions for your operating system.

2. **Install PostgreSQL**
Download and install PostgreSQL from the [PostgreSQL official website](https://www.postgresql.org/download/). Follow the instructions based on your operating system to complete the installation. During installation, take note of the username and password you create for the database.
17 changes: 17 additions & 0 deletions docs/event-service/4_tech-stack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
sidebar_position: 4
---

# Tech Stack

#### Framework :
- **nest.js** (for Node.js)

#### Language :
- **typescript**

#### APIs :
- **REST**

#### Database :
- **PostgreSQL**
7 changes: 7 additions & 0 deletions docs/event-service/5_architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 5
---

# Architecture

![Event Service Architecture](assets/architecture_event_diangram.png)
85 changes: 85 additions & 0 deletions docs/event-service/6_database-schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
sidebar_position: 6
---

# Database Schema

## Entities -Event Management

### Table: Events

| Column Name | Data Type | Constraints |
| --------------------- | ------------------------ | ------------------------------------------------- |
| eventId | uuid | NOT NULL, DEFAULT gen_random_uuid(), PRIMARY KEY |
| isRecurring | boolean | NOT NULL, DEFAULT false |
| recurrenceEndDate | timestamp with time zone | |
| recurrencePattern | jsonb | NOT NULL |
| createdAt | timestamp with time zone | NOT NULL, DEFAULT now() |
| updatedAt | timestamp with time zone | NOT NULL, DEFAULT now() |
| autoEnroll | boolean | DEFAULT false |
| registrationStartDate | timestamp with time zone | |
| registrationEndDate | timestamp with time zone | |
| createdBy | uuid | |
| updatedBy | uuid | |
| eventDetailId | uuid | FOREIGN KEY from "EventDetails" ("eventDetailId") |

### Table: EventDetails

| Column Name | Data Type | Constraints |
| ---------------- | ------------------------ | ------------------------------------------------ |
| eventDetailId | uuid | NOT NULL, DEFAULT gen_random_uuid(), PRIMARY KEY |
| title | character varying | NOT NULL |
| shortDescription | character varying | NOT NULL |
| eventType | character varying | NOT NULL |
| isRestricted | boolean | NOT NULL, DEFAULT false |
| location | character varying | |
| longitude | double precision | |
| latitude | double precision | |
| onlineProvider | character varying | |
| maxAttendees | integer | DEFAULT 0 |
| recordings | jsonb | |
| status | character varying | NOT NULL |
| description | text | NOT NULL |
| createdAt | timestamp with time zone | NOT NULL, DEFAULT now() |
| updatedAt | timestamp with time zone | NOT NULL, DEFAULT now() |
| meetingDetails | jsonb | |
| createdBy | uuid | |
| updatedBy | uuid | |
| idealTime | integer | |
| metadata | jsonb | |
| attendees | text[] | |

### Table: EventRepetition

| Column Name | Data Type | Constraints |
| ----------------- | ------------------------ | ------------------------------------------------- |
| eventRepetitionId | uuid | NOT NULL, DEFAULT gen_random_uuid(), PRIMARY KEY |
| eventId | uuid | FOREIGN KEY from "Events" ("eventId") |
| eventDetailId | uuid | FOREIGN KEY from "EventDetails" ("eventDetailId") |
| onlineDetails | jsonb | |
| startDateTime | timestamp with time zone | DEFAULT timezone('utc'::text, now()) |
| endDateTime | timestamp with time zone | DEFAULT timezone('utc'::text, now()) |
| createdAt | timestamp with time zone | DEFAULT now() |
| updatedAt | timestamp with time zone | DEFAULT now() |
| createdBy | uuid | |
| updatedBy | uuid | |
| erMetaData | jsonb | DEFAULT '{}'::jsonb |

### Table: EventAttendees

| Column Name | Data Type | Constraints |
| ----------------- | ------------------------ | -------------------------------------------------------- |
| eventAttendeesId | uuid | NOT NULL, DEFAULT gen_random_uuid(), PRIMARY KEY |
| userId | uuid | |
| eventRepetitionId | uuid | FOREIGN KEY from "EventRepetition" ("eventRepetitionId") |
| isAttended | boolean | |
| joinedLeftHistory | jsonb | |
| duration | integer | |
| status | character varying | |
| enrolledAt | timestamp with time zone | |
| enrolledBy | uuid | |
| updatedAt | timestamp with time zone | |
| updatedBy | uuid | |
| eventId | uuid | FOREIGN KEY from "Events" ("eventId") |

![NotificationLogs](assets/events_public_EventRepetition.png)
Loading

0 comments on commit 2b39d3f

Please sign in to comment.