Giter Site home page Giter Site logo

stdev-social's Introduction

Back-end API of a social website

Description

This system manages user accounts and facilitates friendship connections between users.

User Accounts: Users can register and have profiles.Users can see a list of other users

Friendship Management: Users can send friend requests to other users.Users can see a list of sent and received friend requests.

This project include modules:

  • user
  • friendship
  • registration
  • authentication

Prerequisites:

  • NodeJs 18 or later
  • Postgresql

ERD

Entity Relationship Diagram (ERD) This document describes the relationships between entities.

Entities UserEntity: Represents a user of the system. FriendshipEntity: Represents a friendship between two users.

UserEntity:

  • id: Unique identifier (primary key) of the user (UUID).
  • firstName: User's first name.
  • lastName: User's last name.
  • dateOfBirth: User's date of birth.
  • username: User's username.
  • password: User's password (excluded in API responses).
  • sentFriendRequests: List of friendship requests sent by the user (one-to-many relationship).
  • receivedFriendRequests: List of friendship requests received by the user (one-to-many relationship).

FriendshipEntity:

  • id: Unique identifier (primary key) of the friendship (UUID).
  • senderId: User ID of the sender (foreign key referencing UserEntity).
  • sender: Reference to the UserEntity that sent the friend request (many-to-one relationship).
  • receiverId: User ID of the receiver (foreign key referencing UserEntity).
  • receiver: Reference to the UserEntity that received the friend request (many-to-one relationship).
  • accepted: Indicates whether the friend request is accepted (boolean).

Relationships

  • One-to-Many: A UserEntity can have many FriendshipEntity objects associated with it through the sentFriendRequests and receivedFriendRequests properties.
  • Many-to-One: A FriendshipEntity belongs to one UserEntity as its sender and another UserEntity as its receiver.

Installation

$ yarn install

Running the app

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Api documentation

You can view project documentation in this url: http://localhost:3000/api-doc

APP CONFIG

App has these variable environment

NODE_ENV='development' BASE_URL='http://localhost:3000/' PORT=3000 APP_NAME='STDEV Social'

Framework

NestJs framework TypeScript starter repository. Nest is an MIT-licensed open source project.

stdev-social's People

Contributors

yadolahabbasnia avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.