Skip to content

kr123Manish/The-Internet-Folks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The-Internet-Folks

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

User Stories (Features)

  • 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.

Problem Statement

  • 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.

Models

Architecture

User (user)

KeyKindNotes
idstring (snowflake)primary key
namevarchar(64)default: null
emailvarchar(128)unique
passwordvarchar(64)-
created_atdatetime-

Community (community)

KeyKindNotes
idstring (snowflake)primary key
namevarchar(128)-
slugvarchar(255)unique
ownerstring (snowflake)ref: > user.id, relationship: m2o
created_atdatetime-
updated_atdatetime-

Role (role)

KeyKindNotes
idstring (snowflake)primary key
namevarchar(64)unique
created_atdatetime-
updated_atdatetime-

Member (member)

KeyKindNotes
idstring (snowflake)primary key
communitystring (snowflake)ref: > community.id
userstring (snowflake)ref: > user.id
rolestring (snowflake)ref: > role.id
created_atdatetime-

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.

API Endpoints

Role

NameURL
CreatePOST /v1/role
Get AllGET /v1/role

User

NameURL
Sign UpPOST /v1/auth/signup
Sign inPOST /v1/auth/signin
Get MeGET /v1/auth/me

Community

NameURL
CreatePOST /v1/community
Get AllGET /v1/community
Get All MembersGET /v1/community/:id/members
Get My Owned CommunityGET /v1/community/me/owner
Get My Joined CommunityGET /v1/community/me/member

Member

NameURL
Add MemberPOST /v1/member
Remove MemberDELETE /v1/member/:id

About

Built API endpoint form community server

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published