Skip to content

kholostyak17/braulg

Repository files navigation

Braulg - Travel social app

FRONTEND

Technologies used:

  • Javascript
  • Bootstrap
  • Sass
  • React
  • React Router
  • API Context
  • Firebase
  • Webpack
  • NPM

Frontend Manual Installation:

  • Make sure you are using node version 16+.
  1. Install the packages: $ npm install
  2. Start the webpack dev server $ npm run start

Context

This project comes with a centralized general Context API. The file ./src/js/store/flux.js has a base structure for the store.

React Context docs

The Provider is already set. You can consume from any component using the useContext hook to get the store and actions from the Context.

import { Context } from "../store/appContext";
const MyComponentSuper = () => {
  //here you use useContext to get store and actions
  const { store, actions } = useContext(Context);
  return <div>{/* you can use your actions or store inside the html */}</div>;
};

BACKEND

Technologies used:

  • Python
  • Flask
  • PostgreSQL
  • alembic
  • werkzeug
  • JWT
  • Cloudinary

Backend Manual Installation:

Make sure you have Python 3.8, Pipenv and a database engine (Postgres recomended)

  1. Install the python packages: $ pipenv install
  2. Create a .env file based on the .env.example: $ cp .env.example .env
  3. Install your database engine and create your database, depending on your database you have to create a DATABASE_URL variable with one of the possible values, make sure you replace the values with your database information:
Engine DATABASE_URL
SQLite sqlite:////test.db
MySQL mysql://username:password@localhost:port/example
PostgreSQL postgres://username:password@localhost:5432/example
  1. Migrate the migrations: $ pipenv run migrate (skip if you have not made changes to the models on the ./src/api/models.py)
  2. Run the migrations: $ pipenv run upgrade
  3. Run the application: $ pipenv run start