stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

[MOVED] CollabNotes

  • 3 Devlogs
  • 14 Total hours

MOVED TO PIXL EVENT | A collaboration notes app where multiple people can edit the same text at the same time, synced via WebSocket

Open comments for this post

4h 50m 17s logged

  • Fixed auth middleware (it was using an invalid SQL query)
  • in GET /api/email/request the token is now URL decoded before it’s used
  • Updated POST /api/login to return a 204 instead of redirection
  • Added pending email database keys for the users who are changing their mail
  • Created the POST /api/verify-email endpoint to verify the mail (either at register or update mail)
  • Added Password4J config file and set a salt length of 64
  • Created the notes table and the sharing codes table
  • fixed Thymeleaf using wrong paths for frontend file locations
  • Created the POST /api/account/update-email endpoint to let users change their mail
  • Created the GET /api/notes endpoint to let the user see the notes he has access to
  • Created the POST /api/notes endpoint to let the user create a note under his user
  • Created the GET /api/notes/{noteId} endpoint to get the data of a specific note (if the user has access to it)
  • Created the DELETE /api/notes/{noteId} endpoint to let a user delete his own notes (not the ones made by other even if he has access to them)
  • Created the POST /api/notes/{noteId}/join endpoint to let a user join a note via its sharing code
  • Created the POST /api/notes/{noteId}/share endpoint to create a sharing code for the note (each code is one-time use only)
  • Created the DELETE /api/notes/{noteId}/share endpoint to delete a sharing code for the note (note owner only)
  • Created the POST /api/notes/{noteId}/leave endpoint to let a user leave a note on its own
  • Created the POST /api/notes/{noteId}/kick endpoint to let the note owner kick someone from the note
  • Created a util function to validate a string for all common password requirements (min 8 chars, a number, a uppercase letter, a lowercase letter and a special character)
  • Created a job to clear pending mails that haven’t been verified in over 10 mins
  • Fixed route patterns, when inside a route("/...") { ... } i was using get("/") { ... } instead of get { ... } and this caused the base route to not exist (like /api/route) but only the one with trailing slash (like /api/route/)

once again no frontend yet so here’s some of the code

0
0
14
Open comments for this post

3h 55m 18s logged

  • Installed a lib to hash & salt user passwords
  • Moved all routes to a routes folder
  • Update verification data in the DB schema
  • Created a PublicDatabaseUser data class that doesn’t contain sensitive info such as password
  • Created a util Crypto object to hash & salt strings
  • Updated the verification mail template
  • Fixed Email class not seeing the template file
  • Email verification endpoint now shows a proper html page (html not made yet tho)
  • All routes now include their method in the file and function name
  • Created the following endpoints:
    • GET /api/request-email
    • POST /api/login
    • GET /api/account
    • PATCH /api/account
    • DELETE /api/account

None of those changes have been tested yet


once again no frontend yet so just code screenshots

0
0
11
Open comments for this post

5h 28m 8s logged

  • Initialized the app by taking & modifying some stuff from my other apps (mainly the userApps discord bot) (EnvVariable enum, Random object, build process w/ tailwind & envs setup, middlewares, AppDatabase object)
  • Created a routes skeleton to show how it will look approximately
  • Created the API endpoint to register
  • Created the API endpoint to logout
  • Added an Email class used to validate emails, check for duplicates and send the verification code
  • Added a job that every 5 minutes checks for users that have not verified their mail and if they haven’t verified in 10 mins, their account is deleted
  • Installed a library to send emails

there’s no frontend yet so i’ll show some of the API routes skeletons

0
0
11

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…