Code Monkey home page Code Monkey logo

post_office_front_end's Introduction

Prerequisites

Cloning the App

To Clone this repository run

git clone https://github.com/MohaKh1/Post_Office_Front_End.git

Frontend

Make sure you have node.js and npm installed

Run

npm install

to install all dependencies and a package.json file should appear.

Backend Server

Make sure you have Pip and Python installed on your machine.

Then move into the backend directory

cd api

Then install all dependencies using pip.

pip install -r requirements.txt

Next place the secrets provided in the google drive (secrets.txt) into a .env file and place the file INSIDE the api folder.

Then we need to install the driver Windows/Linux | Mac for the database connector (pyodbc).

Running the application

Backend

Make sure you are in the /api directory.

Then run

FLASK_DEBUG=1 flask run

to start the server

Frontend

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

if you face any issues, try deleting your node_modules folder and package-lock.json

The page will reload when you make changes.
You may also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can't go back!

If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

post_office_front_end's People

Contributors

angel-sharma avatar brespina avatar mohakh1 avatar

Stargazers

 avatar

Watchers

 avatar

post_office_front_end's Issues

User Authentication

Sign In page

  • takes username and password,
  • uses axios to authenticate what is submitted (by communicating with backend)
  • sends user to one of 4 role pages (customer, driver, employee) --- the number of role pages may be subject change using API
  • has route to signup page

Sign Up page

  • This is a data entry form - inputs first name, last name, email, password, phone number, street address, city , state, and home address. (this may be revised based on the information we actual need)
  • sends data to database using API
  • routes back to sign in page

Please comment or edit if any change or clarification is needed for the above goals because doing so will help clarify for everyone else how each part fits together or distinction of tasks to be done

Create sign in/sign up page

The first page a user should see when they go to our page is the sign in page/ sign up button. So the first thing we will need to do to make the sign up/sign in page is to create the react foundation, then use react router to create a route to the index page. Then we need to make the html/ react components, and link the database to our application. I will be working on the database to the application connection.

Home page

Based on the login type (employee or customer) we need to render different components. The body of the homepage will be the same for everybody, but the navbar will not.
For customer login, in the navbar we need

  1. Link to profile
  2. Send a package
  3. All packages -> all packages for customer

For employee login, use the data returned from the api to determine which employee type it is.
For front clerk in navbar we need. (emp type 1)

  1. Link to profile
  2. All packages -> view all packages in the system + status (will be able to process them)

For the driver, (emp type 2)

  1. Link to profile
  2. All packages -> view all packages in system -> add them to current delivery (change status)
  3. Delivery -> shows all packages to be delivered + can be mark as delivered

For the manager (emp type 3)

  1. Link to profile
  2. Employee overview -> view all employee and some stats + able to add (employee signup) and remove (fire or quit)
  3. All packages -> same as other two but full control
  4. Reports -> will link to page where different reports can be generated. ( we can have more links in it)

Rest of the project

while the Sign Up page is a data entry form that submits customer data we need forms that submit package data and employee data, then we need reports and queries for the packages, customer and employee data.
this is what the next part of the project it, we need the front end forms to send the data via the api to the backend and queries that send the results back to view the data as a report of in some other way.

the following pages for the roles can be created on the front end and will be through the nav bar. If it is easier you can split these pages then route them later

Customer
Profile page for customers // also called Home Page- that modify their individual customer data and view it--data entry form
Package page for customer - input package for themselves -- data entry form
Package status - all packages sent and received by individual customer

Employee
Process page - we have a button that queries all new packages that haven't been processed for the day and employee presses button, then sends data to backend where it says employee processed x packages -- This idea is work in progress
Employee page - can get reports on customer data and package data -- data reports and query's
Manager

Manager report page - report on employee data
manager employee creation page - can modify and create new employees data -- data entry form and data query

Discussion:
post offices and locations to send to, arrivals and cost change, if you deliver to post office then its cheaper and faster or it costs more and takes longer to deliver to a location

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.