Giter Club home page Giter Club logo

notes's Introduction

Notes Web Application
--------------------

The "notes" web application allows users to securely store and manage their notes online. Users can create, edit, delete, and retrieve their notes using a simple and intuitive API.

Setup:
- Make sure you have Ruby and SQLite installed on your system.
- Clone this repository to your local machine.
- Install the required dependencies by running: bundle install.
- Run the database migration to set up the necessary tables: ruby migration.rb.
- Start the application server by running: ruby app.rb.

API Endpoints:
- POST /register: Register a new user with a username and password.
- POST /login: Obtain a JWT token by providing valid username and password.
- POST /paste: Store a new note in the user's bin.
- GET /bin: Retrieve all notes from the user's bin.
- PUT /notes/:note_id: Edit the content of a specific note.
- DELETE /notes/:note_id: Delete a specific note.
- GET /notes/:note_id: Retrieve the content of a specific note.
- GET /notes: Retrieve all notes.

Authentication:
- The authentication process uses JWT (JSON Web Token).
- To authenticate, include the JWT token in the "Authorization" header as follows: "Bearer <jwt_token>".

Database:
- The application uses an SQLite database to store user information and notes.
- The database file is named "pastebin.db" and is created automatically upon running the migration.

Dependencies:
- This application is built with Ruby and uses the following gems: sinatra, sequel, bcrypt, jwt.
- The required gems are listed in the Gemfile.

Note: Replace "http://localhost:9292" in the API endpoints with the appropriate URL if you deploy the application to a different location.

Enjoy managing your notes with the "notes" web application!

notes's People

Contributors

shreyanjain9 avatar

Stargazers

 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.