Coder Social home page Coder Social logo

senavs / essayb.com.br Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 2.95 MB

:heavy_check_mark: Laboratório Avançado de Software (LAS) essay blog project.

Home Page: https://essayb.com.br/

Dockerfile 0.27% Python 42.33% Shell 0.08% JavaScript 0.26% CSS 0.63% TypeScript 56.43%
python nodejs react javascript fastapi jwt sqlachemy postgresql docker docker-image

essayb.com.br's Introduction

Advanced Software Lab (LAS) essay blog project.

Developers

  • João Marcelo de Jesus Macedo (Jmarcelo98).
  • Matheus Reis de Souza Teixeirense (Mat123Reis).
  • Matheus Sena Vasconcelos (senavs).
  • Ygor Oliveira Gonçalves (ygoliveira).

Project Advisor

  • Alexandre Mori.

Setup (with docker)

To run essayB application, you need to have installed docker. Follow this tutorial to get start. Besides, install docker-compose to deploy all containers easily.

Minimal docker and docker-compose version:

docker --version
# Docker version 20.10.3

docker-compose --version
# docker-compose version 1.28.2

After you have installed the docker and cloned the project, run the follow command inside project folder:

docker-compose up

Or you can run the development project with the follow command:

docker-compose -f docker-compose.dev.yml up

Note: to run docker-compose.dev.yml you need to set your local IP address into BACKEND_DOMAIN and FRONTEND_DOMAIN envs inside compose file. Like:

...
    build:
      context: frontend
      dockerfile: Dockerfile.dev
    restart: unless-stopped
    environment:
      # Use your IPv4 address to BACKEND_DOMAIN and FRONTEND_DOMAIN envs
      # Use port 8080 if gateway is activated, otherwise use 8080 to FRONTEND_DOMAIN and 8888 to BACKEND_DOMAIN
      BACKEND_DOMAIN: 172.17.0.1:8080
      FRONTEND_DOMAIN: 172.17.0.1:8080
    volumes:
      - ./frontend/next.config.js:/code/next.config.js
...

Setup locally (without Docker)

You can also run the application without docker installed. To do that, it's necessary to install all programs and libraries locally.

  • Frontend dependencies:
    First, it's necessary to install nodejs.

    node -v
    # v14.15.5

    Then, inside essayb.com.br/frontend folder, install all dependencies.

    npm install

    If it shows any permission error, try to run the same command with root user (or with an administrator cmd for Windows).

    sudo npm install
  • Backend dependencies:
    Second, to run all backend API, it's necessary to install Python 3.9 (or latest) version.

    python3 --version
    # Python 3.9.1

    Then, you need to install all python dependencies. To do so, get into essayb.com.br/backend folder and run the following command.

    pip install -e .
  • Database:
    EssayB application needs a database to store its data. PostgreSQL is the most recommended.

  • Running:
    After install postgres database, nodejs, python and all the dependencies, now it's time to run the EssayB application.

    Setup all environments variables before run frontend and backend apps.

    # linux/mac
    export DATABASE_URI='postgres://username:password@local_database_ip:5432/ESSAYB_DEV'
    # windows
    set DATABASE_URI='postgres://username:password@local_database_ip:5432/ESSAYB_DEV'

    Note: remember to replace username, password and local_database_ip with your local database configuration.

    With it's done, now you can run the apps.

    To run the frontend, get into essayb.com.br/frontend folder and run the follow command:

    npm run dev

    To run the backend, open a new terminal and get into essayb.com.br/backend folder and run the follow command:

    python3 -m api

URLs

Now you can access this URLs and test the application:

Local Application Project URL
Frontend (with docker) http://localhost:8080/
Frontend (without docker) http://localhost:3000/
Backend http://localhost:8888/docs
Production Application Project URL
Frontend WIP
Backend WIP

License

Copyright (c) essayB.
All Rights Reserved.

essayb.com.br's People

Contributors

jmarcelo98 avatar mat123reis avatar senavs avatar ygoliveira avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.