Skip to content

A server-side application which helps students reserve residential spaces. 🏠

License

Notifications You must be signed in to change notification settings

ab-elhaddad/sakenny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation




Sakenny Server


Sakenny is my Graduation Project which I passed with an A+.

πŸ” Description

The project aims to help mainly students studying abroad to find a place to stay in by offering them a variety of options. The project allows users to search for places to stay in, and it also allows users to post ads for places they want to rent out.

πŸ’‘ Used Tools & Technologies

  • Node.js (Runtime environment)
  • TypeScript (Development language)
  • JavaScript (Deployment language)
  • MVC (Design pattern)
  • Express.js (Backend framework)
  • JWT (Authentication)
  • Bcrypt (Password hashing)
  • PostgreSQL (Database management system)
  • db-migrate (Database migrations)
  • Cloudinairy (Image storage)
  • Swagger (APIs documentation)
  • Jasmine.js (Testing)

☁️ Deployment

  • Render (Development stage hosting) Render
  • Microsoft Azure [Azure App Service] (Production stage hosting) node azure
  • Microsoft Azure [Azure Database for PostgreSQL flexible server] (Container for DB) db azure E

🐘 Database Schema

ERD

πŸ“ Project Overview

Overview F

πŸ“‚ Server Architecture

Backend Architecture

  • Controllers (Handle the requests and responses integrating with the models)
  • Models (Handle the database operations)
  • Routes (Handle the routes)
  • Middlewares (Handle the requests before they reach the controllers)

πŸ”§ Pre-requisites

  • Node.js installed on your machine.

  • Have a Cloudinairy account.

πŸ“¦ Installation

  • Install the dependencies and devDependencies and start the server.
npm i 
  • Create a .env file in the root directory and add the following variables.
DATABASE_PROD // The RDBMS name for the production environment)
HOST_PROD // The host name for the production environment
USER_PROD // The username for the production environment
PASSWORD_PROD // The password for the production environment
DB_PORT_PROD // The port number for the production environment

DATABASE_TEST // The RDBMS name for the testing environment
HOST_TEST // The host name for the testing environment
USER_TEST // The username for the testing environment
PASSWORD_TEST // The password for the testing environment
DB_PORT_TEST // The port number for the testing environment

DATABASE_DEV // The RDBMS name for the development environment
HOST_DEV // The host name for the development environment
USER_DEV // The username for the development environment
PASSWORD_DEV // The password for the development environment
DB_PORT_DEV // The port number for the development environment

CLOUDINAIRY_CLOUD_NAME // The cloud name for the cloudinairy account
CLOUDINAIRY_API_KEY // The API key for the cloudinairy account
CLOUDINAIRY_API_SECRET // The API secret for the cloudinairy account

PORT // The port number for the server
SALT // The salt number for the password hashing algorithm
PEPPER // The pepper string for the password hashing algorithm
SECRET_KEY // The secret key for the JWT algorithm
ENV // The environment variable (dev, prod, test)
  • Run the database migrations.
npm run migrate
  • Run the tests.
npm test
  • Run the server.
npm start

✨ How to use the APIs

  • Postman collection for the APIs Postman Collection.

  • The APIs are documented using Swagger. Use the link to see the documentation locally after you start the project