Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 2.28 KB

README.md

File metadata and controls

56 lines (42 loc) · 2.28 KB

My Notes API

My Notes API is a ReST API to manage your digital sticky notes. The API provides endpoints to -

  1. Register a new user
  2. Authenticate a user(generate an access token)
  3. Create a new note
  4. List all notes
  5. Retrieve a note
  6. Update an existing note
  7. Delete an existing note

Refer the open API specification for more details.

Getting Started

Following sections describes prerequisites, installation and usage of the API.

Prerequisites

Following are the prerequisites to get the API up and running.

  1. Auth0 identity provider
    1. Create an Auth0 account
    2. Register the My Notes API
    3. Create a Regular Web Application application
    4. Keep the Client ID and Client Secret handy for subsequent steps
  2. Java JDK 17 or higher
  3. PostgreSQL database

Installation

  1. Clone the repository https://github.com/ahemanna/my-notes-api.git
  2. Set following environment variables -
    1. DB_HOST - Postgresql host name
    2. DB_PORT - Postgresql port number
    3. DB_NAME - Name of the Postgresql database
    4. DB_USERNAME - Database username
    5. DB_PASSWORD - Database password
    6. AUTH0_CLIENT_ID - The client ID of the Auth0 application
    7. AUTH0_CLIENT_SECRET - The client secret of the Auth0 application
    8. AUTH0_MGMT_AUDIENCE - The audience of Auth0's Management API
    9. AUTH0_API_AUDIENCE - The audience of the My Notes API registered on Auth0
    10. AUTH0_API_HOST - The hostname of the Auth0 APIs
  3. Run the maven compile command ./mvnw clean compile to compile the project
  4. Run the maven run command ./mvn spring-boot:run

This should get the API up and running on http://locahost:8080/

Contributing

Any contributions to improve this project is greatly appreciated.

If you have any suggestions, please fork the repository and submit a pull request.

License

Distributed under the MIT License. See LICENSE for more information.