Giter Site home page Giter Site logo

flowlab's Introduction

Notes:

  • need mongo atlas uri
    • for dev: mongodb+srv://mongo:<password>@cluster0.bximy.mongodb.net/dev?retryWrites=true&w=majority
    • for prod: mongodb+srv://mongo:<password>@cluster0.bximy.mongodb.net/prod?retryWrites=true&w=majority

Development

run frontend and backend on different ports

  • install packages: npm install && npm install --prefix frontend
    • troubleshoot: delete package-lock.json and node_modules in root and frontend/ then try installing again
  • set env variables (create .env):
    • NODE_ENV = development
    • MONGO_DEV = <DEV-ATLAS-URI>
    • JWT_SECRET = secret
  • start backend and frontend: npm run dev

Production

instead of running backend and frontend on different ports, for production we compile (build) the frontend and serve it from the backend

  • set env variables (create .env):
    • NODE_ENV = production
    • MONGO_PROD = <PROD-ATLAS-URI>
    • JWT_SECRET = secret
  • build frontend: npm run build --prefix frontend
  • start backend: npm start

Docker

  • go to flowlab directory
  • start app docker-compose up --build
  • remove containers from above docker-compose down -v
  • remove all generated artifacts with docker system prune

flowlab's People

Contributors

jayo78 avatar rajkarra69420 avatar jstmoore avatar zylitol avatar jaz-dev avatar

Watchers

 avatar

flowlab's Issues

Backend: add error middleware

  • want error middleware for entire api so that when errors are produced, they are caught and sent to the client only in development environment
  • dont want client getting errors from backend in production

Auth: validation middleware

  • want to validate data sent from client on the backend
  • post requests for example send data in their body that could be bad - validate it based on rules that make sense given the data (a name field should prob be limited to like 20 chars as an example)

Backend: getParticipants endpoint

  • add GET request endpoint to return a list of participants given a room parameter
  • want participants currently in a room, not all participants that have ever been in that room

Auth: jwt middleware

  • add backend middleware that can be applied to routes
  • implement middleware in /middleware and apply to authed routes (ie edit profile, create room, ...)

Rooms: add error handling for socketIO

  • handle errors on the backend from frontend socket connection
  • implement callback that can be handled on the front end to display an error is update state

Rooms: handle unauthed joins

  • want unauthed users to be able to join rooms
  • unauthed users don't have a set name so need to some how give them a default name or prompt for a name in the PreRoomScreen (frontend/screens)
  • also don't want unauthed users to be redirected to dashboard on leaving a room

Feature: dashboard rejoin

if in a room (participantInfo not null) and at the dashboard page, instead of redirecting to the room, display a rejoin button. Also show a join button and when pressed, leave current room and join the new one.

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.