Skip to content

simple, scalable and containerized rating application

License

Notifications You must be signed in to change notification settings

sudiptog81/stay.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stay.io

GitHub CI Build Status GitHub Tests Workflow GitHub Build Workflow Backend Dependencies Frontend Dependencies

stay.io is a simple, scalable and containerized rating application.

It features role-based access to add, edit, delete, view, like, rate and comment on listings posted by providers who are able to add, edit, and delete their own listings and have all features that a normal unprivileged user would have. A normal user is able to only like, rate and comment on listings. They are also able to edit and delete their profiles.

The frontend application is built on Vue.js and the backend is a JWT-authenticated RESTful JSON API that communicates with a Postgresql database. Authentication is cookie-based and leverages cookie-handling by Passport.js.

The application is available to be deployed in a multi-container deployment according to the docker-compose.yml file in the repository.

View CI Build Status

View GitHub Workflows

Quick Start

Set up a VirtualHost in your web server that points to the backend of the application.

server {
  listen 80;
  server_name <your-domain>
  location / {
    proxy_pass http://localhost:5002/;
  }
}

Replace the temporary API endpoint with <your-domain> in frontend/src/api/config.js.

Add a Facebook API Secret in .env as FB_API_SECRET=<your-secret>

Use docker-compose as the container orchestrator to spin up all required services. The command that is to be executed is given below.

sudo docker-compose -f docker-compose.yml up \
                    -d --build frontend &

The docker-compose.yml in the root of the repository exposes various aspects of the application at the given ports.

  • 5001 - Database (postgresql)
  • 5002 - Backend APIs
  • 5003 - Frontend served via NGINX

Technologies

Backend ExpressJS REST API

Frontend Reactive Web Application

Unit Testing

CI/CD Pipelines

Deployment

Development

Clone this repository on your machine.

Install all required dependencies in backend and frontend directories by executing npm install in both directories. Install the @vue/cli package globally by executing sudo npm i -g @vue/cli.

Tests can be run in backend and frontend directories by executing npm test in either one of them for triggering the respective test suites.

API Reference

The REST API Documentation is hosted at SwaggerHub.

License

The MIT Open-Source License

Screenshots

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15