https://github.com/thujuli/todo-flask
A simple todo list app built in Flask and Bootstrap
https://github.com/thujuli/todo-flask
Last synced: 12 months ago
JSON representation
A simple todo list app built in Flask and Bootstrap
- Host: GitHub
- URL: https://github.com/thujuli/todo-flask
- Owner: thujuli
- Created: 2023-07-01T11:29:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-07T02:31:33.000Z (almost 3 years ago)
- Last Synced: 2025-03-27T15:50:00.574Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 858 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TODO APP FLASK API
## Backgound
This my final project, create a simple todo app using a minimalis frontend (html, css, js and bootstrap framework) with minimalis backend (flask framework).
And for deployment is use Docker and Docker Compose.
## Requirements
- Web Browser (Chrome, Firefox etc.)
- Text Editor (VSCode, Neovim, Nano, etc.)
- Python 3.8 or higher
- Sqlite3
- Docker
- Docker Compose
## Objective
- Apply my skills to create a simple frontend app using html, css, js and bootstrap framework
- Apply my skills to create a simple backend using flask framework
- Apply my skills to consume API use AJAX
- Using Dockerfile to create a custome images for flask app
- Compose service using Docker Compose
- Create a scheduling job using crontab
## Folder Structure
```
.
├── app (main package for flask)
│ ├── auth.py (API endpoints for auth)
│ ├── config.py (config for database and jwt token)
│ ├── __init__.py (initialization flask app)
│ ├── models.py (contains table structures and relationships)
│ ├── projects.py (API endpoints for projects)
│ ├── static (contains the static file (css/js))
│ │ └── js
│ │ ├── script-index.js
│ │ ├── script-login.js
│ │ ├── script-project.js
│ │ └── script-register.js
│ ├── tasks.py (API endpoints for tasks)
│ ├── templates (contains the html files)
│ │ ├── auth
│ │ │ ├── base.html
│ │ │ ├── login.html
│ │ │ └── register.html
│ │ ├── base.html
│ │ ├── index.html
│ │ └── project.html
│ └── views.py (route for rendering templates)
├── docker-compose.yml (deploy flask and postgres services)
├── Dockerfile (create a flask custom images)
├── images (list images for documentation)
│ ├── login-page.png
│ ├── project-add.png
│ ├── project-delete.png
│ ├── project-edit.png
│ ├── projects-list.png
│ ├── registration-page.png
│ ├── task-add.png
│ ├── task-delete.png
│ ├── task-edit.png
│ ├── tasks-filter.png
│ └── tasks-list.png
├── README.md (documentation file for github)
├── requirements.txt (list third party packages used by flask app)
├── run.py (python file for running flask app)
└── script (contains script for backup, copy and restore file from container)
├── backup.sh
├── copy.sh
└── restore.sh
```
## Features
#### Registration Page

#### Login Page

#### Project Page
- List of projects

- Added new project

- Edit project

- Delete project

#### Todo Page (Home)
- List of tasks

- Tasks filtered by selected project

- Added new task

- Edit task

- Delete task

## Setup Project
- Clone this repository
```
# clone using ssh
git clone git@github.com:thujuli/todo-flask.git
#clone using https
git clone https://github.com/thujuli/todo-flask.git
```
- Change directory to this repository
```
cd todo-flask
```
## Running Project
##### Without Container
- Create virtual environment
```
python -m venv .venv
```
- Use the virtual environment
```
source .venv/bin/activate
```
- Install third party packages from requirements.txt
```
pip install -r requirements.txt
```
- Run this project
```
python run.py
```
##### With Docker Compose
- Run docker compose
```
docker compose up -d
```