My Notes API
is a ReST API to manage your digital sticky notes. The API provides endpoints to -
- Register a new user
- Authenticate a user(generate an access token)
- Create a new note
- List all notes
- Retrieve a note
- Update an existing note
- Delete an existing note
Refer the open API specification for more details.
Following sections describes prerequisites, installation and usage of the API.
Following are the prerequisites to get the API up and running.
- Auth0 identity provider
- Java JDK 17 or higher
- PostgreSQL database
- Clone the repository
https://github.com/ahemanna/my-notes-api.git
- Set following environment variables -
- DB_HOST - Postgresql host name
- DB_PORT - Postgresql port number
- DB_NAME - Name of the Postgresql database
- DB_USERNAME - Database username
- DB_PASSWORD - Database password
- AUTH0_CLIENT_ID - The client ID of the Auth0 application
- AUTH0_CLIENT_SECRET - The client secret of the Auth0 application
- AUTH0_MGMT_AUDIENCE - The audience of Auth0's Management API
- AUTH0_API_AUDIENCE - The audience of the
My Notes API
registered on Auth0 - AUTH0_API_HOST - The hostname of the Auth0 APIs
- Run the maven compile command
./mvnw clean compile
to compile the project - Run the maven run command
./mvn spring-boot:run
This should get the API up and running on http://locahost:8080/
Any contributions to improve this project is greatly appreciated.
If you have any suggestions, please fork the repository and submit a pull request.
Distributed under the MIT License. See LICENSE for more information.