Skip to content

Commit

Permalink
📖 DOC: Design and Implementation part of the PRD
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Sulzer <[email protected]>
  • Loading branch information
violoncelloCH authored and unglazedstamp committed Jun 7, 2024
1 parent 7e27106 commit 5478380
Showing 1 changed file with 96 additions and 14 deletions.
110 changes: 96 additions & 14 deletions template/9-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,117 @@

## Frontend

*List the key libraries, languages, components used by the MVP.*
### Implementation framework

*If applicable, describe essential screens.*
The app is developed in Kotlin using Jetpack Compose using an MVVM architecture. The repository architecture is used for having a single interface for all data.

Furthermore the following libraries are used:
- Supabase: interaction with the backend
- Google Auth: for users wishing to sign in using it
- Maplibre: for a modern vector-rendering map; the central element of the app
- Google Play Location Service
- Hilt: depenency injection
- Room: local DB for synchronisation and caching


### Primary screens
- Main screen: map with events, allowing searching and filtering and discovery
- Secondary screen: list mode for events; the same search/filtering is applied
- Other screens:
- My Events: allows to see created and joined events
- My Profile: allows to modify the users profile
- Create Event: screen to create events
- Associations: shows associations and the relation the user is with them (following, committee member)

## Backend

*Decompose the MVP into functional blocks.*
The backend server hosts all necessary data and enforces access policies. We are using Supabase which combines a series of industry standard tools into a nice consolidated API with its library. Supabase provides authentication of users (additionnaly via Google OAuth), storage of structured data and object storage for files.
Access and modification is restricted based on the type and ownership of the element.

## Data Model

*What data are you collecting / managing?*
Alll the structured data i stored in the PostgreSQL database integrated into Supabase.

*How is it organised?*
### Authless Data

*Where is it stored?*
#### Tags

*How is it shared/copied/cached?*
Purpose - Contains all the available tags. Tags include categories of type of events/interests as well as specific ones like Sections or Semester for the campus context.

## Security Considerations
Fields - Tag Id (Primary Key), Name, Parent Id

## Infrastructure and Deployment
#### Events

*How is the application developed, tested and deployed?*
Purpose - Contains information about all events added to the app.

*Any special infrastructure requirements.*
Fields - Event Id (Primary Key), Creator Id, Organizer Id, Title, Description, Start Timestamp, End Timestamp, Location (Name, Long, Lat), Participant Count, Max Particiants

## Test Plan
##### Event Tags

Purpose - Records represent tags assigned to an event.

Fields - Tag Id (Foreign Key), Event Id (Foreign Key) (Composite Primary Key)

#### Associations

Purpose - Contains information about the validated associations.

Fields - Association Id (Primary Key), Name, Description, Url

##### Association Tags

Purpose - Records represent tags assigned to an association.

Fields - Tag Id (Foreign Key), Association Id (Foreign Key) (Composite Primary Key)


### Auth UserData

#### User Profiles

Purpose - Contains information about the user

Fields - User Id (Foreign Key) (Primary Key), Name

##### User Tags

*How is the application developed, tested and deployed?*
Purpose - Records represent tags assigned to a user.

*Any special infrastructure requirements.*
Fields - User Id (Foreign Key), Tag Id (Foreign Key) (Composite Primary Key)

##### Association Subscribtion

Purpose - Records represent users which follow associations.

Fields - User Id (Foreign Key), Association Id (Foreign Key) (Composite Primary Key)

##### Committee Member

Purpose - Records represent which users are member of a committee of an association and therefore get the right to publish in the name of the association.

Fields - User Id (Foreign Key), Association Id (Foreign Key) (Composite Primary Key)

##### Event Joins

Purpose - Records represent a user having joined (e.g. signed up for) a specific event.

Fields - User Id (Foreign Key), Event Id (Foreign Key) (Composite Primary Key)


##### User Profile Picture

Profile pictures are stored as objects in the S3 bucket; access is restricted based on the ownership of the object.

## Security Considerations

Storage of user data is limited to the strictly required data for the app to work.
RLS (Row Level Scurity) policies restrict access to resources, preventing unauthorized users to access personal information like which events are joined by a given user. They also prevent modification of data by unauthorized users.
Additionally in accordance to GDPR compliability, the app will allow to completely delete all data of a given user.

## Infrastructure and Deployment

The primary infrastructur is a Supabase instance wich is currently hosted by Supabase themselves on Amazon AWS. The option to selfhost Supabase on whatever infrastructure (included on premise) exists.

## Test Plan

We will write integration tests for all possible user stories. Furthermore also the interaction with the backend service will be tested in a test environment. This helps to catch potential edge-case situations in interaction of multiple users.

0 comments on commit 5478380

Please sign in to comment.