Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
send project
  • Loading branch information
otitamario committed Nov 21, 2022
commit 404cee26a431fc4daba348f1f150175d5e0ed360
29 changes: 29 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<h1>Back End</h1>
<br>
pip install -r requirements.txt
<br>
create you .env file as .env.example
<br>
create your database on postgresql , the same database name in .env file
<br>

Run the command: alembic init alembic
<br>
Run the command: alembic revision --autogenerate -m "creat users table"
<br>
Run the command: alembic upgrade head
<br>
Run server: uvicorn app.main:app --host localhost --port 8000 --reload
<br>
The Api documentation is on this url:
<br>
<a href="http://localhost:8000/docs">http://localhost:8000/docs </a>
<h1>Front End</h1>
<br>
npm install
<br>
npm start
<br>
<h3>To do:</h3>
<br>
Finish the dashboard frontend
19 changes: 7 additions & 12 deletions backend/readMe.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
pip install fastapi[all]
pip install -r requirements.txt
<br>
pip install sqlalchemy psycopg2
create you .env file as .env.example
<br>
pip install "passlib[bcrypt]"
create your database on postgresql , the same database name in .env file
<br>
pip install 'fastapi-jwt-auth[asymmetric]'

Run the command: alembic init alembic
<br>
pip install http3
Run the command: alembic revision --autogenerate -m "creat users table"
<br>
pip install alembic
<br>
alembic init alembic
<br>
alembic revision --autogenerate -m "creat users table"
<br>
alembic upgrade head
Run the command: alembic upgrade head
<br>
Run server: uvicorn app.main:app --host localhost --port 8000 --reload
7 changes: 7 additions & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
requests
fastapi[all]
sqlalchemy
psycopg2
passlib[bcrypt]
fastapi-jwt-auth[asymmetric]
alembic
9 changes: 0 additions & 9 deletions frontend/src/components/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React, { Component } from 'react'
import { Container, Row, Col } from 'reactstrap'
import ModalForm from "./Modals/ModalForm";
import DataTable from "./Tables/DataTable";
import { CSVLink } from "react-csv"

class Dashboard extends Component {
state = {
Expand Down Expand Up @@ -60,14 +59,6 @@ class Dashboard extends Component {
</Row>
<Row>
<Col>
<CSVLink
filename={"db.csv"}
color="primary"
style={{float: "left", marginRight: "10px"}}
className="btn btn-primary"
data={this.state.items}>
Download CSV
</CSVLink>
<ModalForm buttonLabel="Add Item" addItemToState={this.addItemToState}/>
</Col>
</Row>
Expand Down