Note
To test the CURL Commands, replace the url either with the live demo url, or your self host one.
- Enter both your email and password.
- Click "Login". (Send POST request
/api/login)
Using correct credentials to log in
| password | |
|---|---|
| chung@example.com | 1234567890 |
Result: User successfully authenticated and will be redirected to the home page
Test using CURL
curl -X POST http://your-api-url/api/login \
-H "Content-Type: application/json" \
-d '{"userEmail": "your_email@example.com", "userPassword": "your_password"}'
Using incorrect credentials to log in / wrong email format
Result: Error message will be displayed
To sign up,
- Enter your email, password, and the confirm password to double check the password.
- Click "Sign up". (Send POST request
/api/signup) - If the password matched and the user name is available, the system will save the registered user information to the database
- Redirect to the home page
| field | value |
|---|---|
| Username | Chiaki Morisawa |
| morisawa@example.com | |
| Password | morisawa123 |
| Confirm Password | morisawa123 |
Result: User is successfully registered and will be redirected to the home page
Username or email already exists / password does not match / Missing any field
Result: Error message will be displayed
curl -X POST http://your-api-url/api/login \
-H "Content-Type: applicationcurl -X POST <url>/api/register \
-H "Content-Type: application/json" \
-d '{"userName": "your_username", "userEmail": "your_email@example.com", "userPassword": "your_password"}'/json" \
-d '{"userEmail": "your_email@example.com", "userPassword": "your_password"}'
Uses post request /auth/google to login / register with Google OAuth
To sign in / sign up with Google OAuth,
- Click either "Continue with Google" or "Register with Google", depending on which page you are in
- Choose the account / Login to your Google account
- Authorize the application to fetch your information
If authentication is successful, the system will redirect to the home page. If failed to authenticate, the system will redirect to the login page
To create a note,
- Click the "Create Note" Input box
- Write something in the input box
- Click the "Create" button (Send POST request
/api/note)) - Wait the server to acknowledge and display a new card with the written content onto the page
Test using CURL
curl -X POST http://your-api-url/api/notes \
-H "Content-Type: application/json" \
-d '{"content": "Your note content here"}'
To edit a note,
- Click on the content on the note card
- Edit the content by typing it, changes will be saved automatically (Send PUT request
/api/note/:id) with interval of 5 seconds when focus - When the content lost focus, the changes will be saved to the database
Test using CURL
curl -X PUT http://your-api-url/api/notes/your_note_uuid \
-H "Content-Type: application/json" \
-d '{"content": "Updated note content here"}'
To delete a note,
- On the note that would like to delete, click the "Delete" icon button
- Click "Delete" to confirm the deletion
- Send DELETE request
/api/note/:idto server to execute the delete action - When the action is completed, the note will be removed from the page
Test using CURL
curl -X DELETE http://your-api-url/api/notes/your_note_uuid \
-H "Content-Type: application/json"
To search for a note,
- Click the "Search" Input box
- Write something in the input box
- The POST request
/api/searchwill be sent along with the keyword to the server when user stop typing - Wait the server to acknowledge and query the result
If result is found, the system will display the result on the page If result is not found, the system will display a message that there are no matching results If the keyword is empty, the page will show all the note entry
Test using CURL
curl -X POST http://your-api-url/api/searchNotes \
-H "Content-Type: application/json" \
-d '{"keyword": "your_search_keyword"}'
To logout,
- Click the avatar icon
- Click "Logout" on the flyout menu (Send GET request
/logout) - Redirect to the login page
To change the username,
- Click the avatar icon
- Click the edit icon next to the username on the flyout menu
- Enter the new username
- Click "Save" (Send PUT request
/api/updateUsername)
Test using CURL
curl -X PUT http://your-api-url/api/updateUsername \
-H "Content-Type: application/json" \
-d '{"newUserName": "your_new_username"}'
Note
This feature is not available for Google OAuth users
To change the email address,
- Click the avatar icon
- Click the edit icon next to the email address on the flyout menu
- Enter the new email address
- Click "Save" (Send PUT request
/api/updateEmail)
If the update is acknowledged, the flyout will update the information accordingly.
Test using CURL
curl -X PUT http://your-api-url/api/updateEmail \
-H "Content-Type: application/json" \
-d '{"newEmail": "your_new_email@example.com"}'
Note
This feature is not available for Google OAuth users
To change the password,
- Click the avatar icon
- Click "Change Password" on the flyout menu
- Enter the new password along with your current password
- Click "Save" (Send PUT request
/api/updatePassword)
Test using CURL
curl -X PUT http://your-api-url/api/updatePassword \
-H "Content-Type: application/json" \
-d '{"currentPassword": "your_current_password", "newPassword": "your_new_password", "confirmPassword": "your_new_password"}'




