Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/silentworks/flask-notes
https://github.com/silentworks/flask-notes
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/silentworks/flask-notes
- Owner: silentworks
- License: mit
- Created: 2023-09-21T14:45:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-06T16:53:47.000Z (11 months ago)
- Last Synced: 2024-05-01T23:48:05.956Z (6 months ago)
- Language: CSS
- Homepage: https://notes.peelingpixels.com
- Size: 350 KB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask Notes
This is a Flask/Supabase project showing how to create a user profile along with how to store sensitive data that only the user of that data should be able to view using a one-to-one relationship and row level security (RLS). This project also demonstrates how to use a Postgres function to update two tables (which is done in a transaction so that if one fails there should be a rollback) using a `.rpc` function call. We also demonstrate how to use a generated column for the slug inside the database by making use of a Postgres function we create. Storage is used to store the featured image for the notes in the app.
This project makes use of:
- [Supabase Python Library](https://supabase.com/docs/reference/python/introduction)
- [Poetry](https://python-poetry.org/)
- [Flask](https://flask.palletsprojects.com/en/3.0.x/)
- [DaisyUI](https://daisyui.com/)
- [tailwindcss](https://tailwindcss.com/)
- [pgTAP](https://pgtap.org/) Postgres unit testing
- [Tailwind Profile from Codepen](https://codepen.io/ScottWindon/pen/XWdbPLm)
- [heroicons](https://heroicons.com/)## Getting started
You can get started with this locally by using the Supabase CLI. Make sure you have the CLI installed before continuing. You can find installation instructions [here](https://supabase.com/docs/guides/cli).
Create a copy of this project using the commands below:
```bash
npx degit silentworks/flask-notes project-name
cd project-name
npm install # or pnpm install or yarn install
poetry install
```Run the command below to start your local Supabase docker instance
```bash
npx supabase start
```Copy `.env.example` file and rename it `.env`. Now copy the credentials you were given when you ran `npx supabase start` into this file.
> Be sure to take a peek at the `.sql` files inside the `supabase/migrations` and `supabase/tests` directory. You can run the supabase tests by calling `npx supabase test db`.
Now we can start the project dev server:
```bash
poetry run flask run --debug
```We can now navigate to the `/auth/signup` url to create an account.