Giter Club home page Giter Club logo

note-maker's Introduction

Features

A personal note taking web app with a decent UI, and support for

  • Adding new notes,
  • Viewing notes list we have so far,
  • Storing all the notes in database,
  • Modify or Delete existing notes

Run Locally

  • You can clone the repo using git clone https://github.com/zencodess/note-maker.git
  • cd note-maker
  • pip3 install requirements.txt
  • python3 run app.py
  • Open http://127.0.0.1:5000/ on browser (eg: Chrome)

You will see Note Maker app running. eg: Refer to this picture, to check my app

Code Overview

UML Diagram

Backend (app.py)

This app.py file sets up the note-taking web application using Flask for the backend and SQLAlchemy for database interactions.

Database configuration

  • Database URL: Specifies the database's location. Here, SQLite.
  • Engine: The SQLAlchemy engine that manages connections to the database.

ORM Model

Note Class: This defines the Note table in the database.

  • __tablename__: The name of the table.
  • id: A column for the primary key.
  • content: A column for the note's content.

Routes

  • / : Renders the home page (index.html)
  • /notes : Handles both GET and POST requests.
    • POST: Adds a new note to the database, after parsing the request. Returns the newly created note as JSON.
    • GET: Retrieves all notes from the database. Returns the notes as JSON.
  • /notes/<int:note_id> : Handles PUT and DELETE requests for a specific note by its ID.
    • PUT: Updates an existing note. Returns the updated note as JSON.
    • DELETE: Deletes an existing note. Returns a deletion confirmation message.

SQLite DB

Notes will be stored in DB

Frontend (static/scripts.js)

The frontend handles the user interface and interactions, including loading, adding, editing, and deleting notes.

Class: NoteController

  • File: static/scripts.js
  • Description: Manages the collection of notes and provides methods to load, add, edit, delete, and save notes.
  • Methods:
    • loadNotes(): Loads notes from the backend.
    • addNote(): Adds a new note.
    • editNote(): Edits an existing note.
    • deleteNote(): Deletes a note.
    • saveNote(): Saves changes to a note.

note-maker's People

Contributors

zencodess avatar

Watchers

 avatar

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.