ToDo App for demo purposes
This repo consists of a backend server (todo_backend
) and a front end (todo_frontend
).
The backend is written in Python using Django Rest Framework (DRF) while the front end is written in javascript using React.
My primary focus was to create a usable app in the frameworks that AcreTrader uses. I think that I did accomplish that, although I will say if I could do it over again I would have spend more time on the backend and learning how to set up authentication. As it stands I think I underestimated how long it would take me on the frontend and I was only able to implement some very basic authentication with username and password.
One of the key things I learned during this demo was just how much functionality Django gives the user right out of the box. I was very pleased to see that with very little code on my part I had implemented CRUD on a todo object. I was also pleased to note that migrations work much the same way as Ruby on Rails, so that concept was easy to grasp, as well as object relational mapping.
NOTE: To run the app you should have python installed.
- Create a virtual environment
python3 -m venv env
- Start venv
source env/bin/activate
- Install dependencies
pip install -r requirements.txt
- Run the server
python manage.py runserver
NOTE: To run the app you should have npm installed.
NOTE: To run the front end you should be in the /todo_frontend directory.
- Install dependencies
npm install
- Start web app
npm start
The easiest way to test is going to be from the browser (Chrome recommended)
With both front and back end running locally, navigate to http://localhost:3000/sign-up
After signing up, testing the required CRUD functionality should be pretty intuitive. Use the UI to add, delete, modify, and view todos.
Additional tip: Create a new account, you will notice that the todos are filtered by user 😱
Note: If you need to log back in, just go to http://localhost:3000/login
Possible routes are /
, /login
, and /sign-up