Skip to content

Julien-Dosiere/LocalHub-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local-Hub API

Description

This application was developed to serve as the backend of the Localhub front app. Its main role is to provide data related to users & projects objects stored in database through a GraphQL API to the frontend. It was developed using framework Express.js, PostgresQL database, Websocket and Apollo for implementing GraphQL.

Project might still evolve in the coming months, but here are its current main features:

  • User authentification (using JWT)
  • User & Projects management with associated needs (CRUD model)
  • Project search using geo coordinates
  • Upload of images & files for related projects
  • Comments threads (using Websocket)

Get Started

  1. Install Redis
  1. Create a postgres 'localhub' DB
$ psql -U postgres
$ psql
    CREATE DATABASE localhub;
  1. Install postgres extensions "uuid-ossp" & "pgcrypto" in your localhub database
$ psql -d localhub
$ localhub=#
    CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
    CREATE EXTENSION IF NOT EXISTS "pgcrypto";
  1. Import DB Schema with seeds
$ psql -d localhub -f data/init.sql 
  1. Install npm dependencies
$ npm install
  1. Create your .env using .env.example as template and define your database url. You can change other settings if necessary.

  2. Start the app

$ npm run dev
  1. (optionnal) Go to root URL to access documentation

http://localhost:3000/

About

Backend serving the LocalHub frontend app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published