Skip to content

Question and answer service with social media interactions.

Notifications You must be signed in to change notification settings

SegmentationFaultEnjoyer/usof

Repository files navigation

USOF


Question and answer service with social media interactions.

About app


Whole USOF application with frontend and backend as a single app.

Technology stack:

  • Backend: NodeJS, Express
  • Database: Postgresql
  • Frontend: React, Redux>, SASS, MUI
  • Bundler: Vite

Architecture:

  • Server-API: REST and JSON-API specifications, MVC pattern
  • Database-API: builder pattern
  • Styles: BEM specification
  • Authentication: Access and refresh tokens model with JWT

Features:

  • Authorization, registering, reseting password
  • User pages
  • All CRUD operations with posts and comments
  • Sorting, filtering, pagination
  • Likes, dislikes, user rating
  • Interactions with images
  • Admin panel
  • Mobile friendly and responsive layout
  • Smooth and convinient UI/UX
  • Incredible loaders, slow down your network just to face this beauty

Before start preparations

1. Database


start postgresql server and create empty data base 	#docker container probably the most convinient way

2. Setup the environment


Create .env file with following entries:

- PORT= #port
- HOST= #host
- JWT_TOKEN= #token key
- JWT_ACCESS_TOKEN_LIFESPAN= #minutes exp: '60 minutes'
- JWT_REFRESH_TOKEN_LIFESPAN= #hours (not less than 1, not greater than 6) exp: '2 hours'
- DB_URL= #postgres connection string exp: "postgresql://user:password@localhost:8889/db_name?sslmode=disable"
- MAILGUN_API_KEY= #your api key for mailgun service
- MAILGUN_DOMEN= #your mailgun domen
- DISABLE_MAILGUN = # 1 in case you want to disable it or 0 if not

3. Installing dependencies and preparing database


yarn install      
yarn migrate

4. Starting server


yarn dev 	#for developing mode
yarn build:client && yarn build:server 	#for production