Due to security resons password removed from server.js file for testing please use this link https://snowflake-rose.vercel.app and below mentioned endpoints
- Module: Authentication
- Feature: User should be able to signup using valid name, email and strong password.
- Feature: User should be able to signin using valid credentials.
- Module: Community
- Feature: User should be able to see all communities.
- Feature: User should be able to create a community.
- Module: Moderation
- Feature: User should be able to see all community members.
- Feature: User should be able to add a user as member.
- Feature: User should be able to remove a member from community.
- You need to build the APIs that adheres to above user stories.
- The Role names are strict.
- The API URLs and Response Structure is fixed.
- The field attributes and table names are strict as well.
- Addition of field for storing IDs when using NoSQL is allowed.
- Validations for each API must be carried out.
Key | Kind | Notes |
---|---|---|
id | string (snowflake) | primary key |
name | varchar(64) | default: null |
email | varchar(128) | unique |
password | varchar(64) | - |
created_at | datetime | - |
Key | Kind | Notes |
---|---|---|
id | string (snowflake) | primary key |
name | varchar (128) | - |
slug | varchar (255) | unique |
owner | string (snowflake) | ref: > user.id , relationship: m2o |
created_at | datetime | - |
updated_at | datetime | - |
Key | Kind | Notes |
---|---|---|
id | string (snowflake) | primary key |
name | varchar(64) | unique |
created_at | datetime | - |
updated_at | datetime | - |
Key | Kind | Notes |
---|---|---|
id | string (snowflake) | primary key |
community | string (snowflake) | ref: > community.id |
user | string (snowflake) | ref: > user.id |
role | string (snowflake) | ref: > role.id |
created_at | datetime | - |
Note:
Snowflake IDs are just string. Think of them just like UUID. Use our library to generate unique Snowflake IDs . It works exactly like generating UUIDs.
Name | URL |
---|---|
Create | POST /v1/role |
Get All | GET /v1/role |
Name | URL |
---|---|
Sign Up | POST /v1/auth/signup |
Sign in | POST /v1/auth/signin |
Get Me | GET /v1/auth/me |
Name | URL |
---|---|
Create | POST /v1/community |
Get All | GET /v1/community |
Get All Members | GET /v1/community/:id/members |
Get My Owned Community | GET /v1/community/me/owner |
Get My Joined Community | GET /v1/community/me/member |
Name | URL |
---|---|
Add Member | POST /v1/member |
Remove Member | DELETE /v1/member/:id |