Git Product home page Git Product logo

capstone-project-dump-stat-intelligence's Introduction

Pantry Pirate

COMP3900 Group Project - Dump Stat Intelligence

Running Requirements / User Guide

To run the project, ensure most recent version of:

are all installed.

To install required packages for backend:

  • create a new python3 virtual environment with pipenv --three when in the root directory of the project
  • Run pipenv install in the root directory to install all required packages

To install required packages for the frontend:

  • cd into /frontend
  • run yarn install (note if you get to a message that says the installer is "locking" and doesn't end you can control-c and continue)

To run the project:

  • ensure no other processes are running on ports 3000, 8000
  • open 2 terminal windows in the root directory of the project
  • run make frontend in one window
  • in the other window run pipenv shell to use the pipenv environment
  • run make backend in the other window
  • visit http://localhost:3000 and use the project

Getting Started

Using Make

Ensure you have concurrently installed (yarn global add concurrently) and are in the python virtual environment for backend (pipenv shell in /backend/pantrypirate). You can use these commands to run the project:

  • make backend: run the backend on port 8000
  • make frontend: run the frontend on port 3000
  • make all: simultaneously make frontend and backend

Frontend

See The API Spec for details on what the frontend expects

Running the project**

  • Ensure nodejs and yarn are installed
  • Install required packages: yarn install

Dev server (hot reloading): yarn run dev

Build for production: yarn run build

Frontend File Structure

/components
/lib
  /api
  /redux
  /utils
/pages
/public
/styles
  • /components contains shared React components used in various routes
  • /lib library of helper scripts
    • /api scripts associated with making calls to and from the backend
    • /redux files associated with the state management of the site, including the redux actions and reducers
    • /utils remaining helper scripts, mainly are localstate management
  • /pages contains views for routes. Routes for the frontend are created based on the file structure underneath this folder (https://nextjs.org/docs/routing/introduction)
  • /styles contains GLOBAL styles. For most Sass work you should create a module for each component in the same directory as the component. I.e. create components/Button.js and then also create components/Button.module.scss and import the scss file in the component.

Backend File Structure

/pantrypirate
    db.sqlite3
    manage.py
/pantrypirate/backend
    /migrations
    admin.py
    apps.py
    models.py
    serializers.py
    tests.py
    urls.py
    views.py
/pantrypirate/pantrypirate
  • /pantrypirate
    • db.sqlite3 database for backend
    • manage.py backend interaction entry point
    • /backend
      • /migrations Django Sqlite database temporary migration folder
      • admin.py registering models for editing on Django admin page
      • apps.py registering backend as an application for the admin
      • models.py contains Django models for database interaction
      • serializers.py contains REST serializers for interaction between frontend and database
      • tests.py contains tests for the backend
      • urls.py contains routes for backend views
      • views.py contains scripts to deal with each route
    • /pantrypirate contains high level application configuration for Django

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.