PunctuOwlity authenticates users entirely on-device. There is no remote server and no cloud sync — on Android, accounts are stored in a local SQLite database (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/punctuowlity/llms.txt
Use this file to discover all available pages before exploring further.
punctuowlity.db), while the browser version stores accounts as JSON in localStorage under the key punctuowlity-users. Both platforms share the same conceptual flow: sign up, log in, and stay authenticated for the life of the session.
Creating an Account
Open the sign-up screen
Android: Tap Sign Up on the
LoginActivity screen. This launches SignupActivity.Browser: Click the Sign Up link on index.html. This navigates to signup.html.Fill in your details
Android:
SignupActivity presents three fields — editEmail (your username), editPassword, and editConfirmPassword. Despite the field ID, the value entered here is stored as the account’s username.Browser: signup.html collects six required fields — First Name (#firstName), Last Name (#lastName), Email Address (#editEmail), Username (#signupUsername), Password (#signupPassword), and Confirm Password (#confirmPassword) — plus an optional Phone field (#phone) for SMS alerts.Submit and validate
Android: The Browser: The
buttonCreateAccount click listener confirms that password equals confirmPassword, then calls DatabaseHelper.insertUser(username, password). A toast reports success or failure.#signupForm submit handler checks that all required fields are filled, confirms that the two passwords match, and then checks whether the chosen username or email already exists in punctuowlity-users. If everything is valid, a new account object is pushed to the users array and saved via saveUsers().Logging In
Android:LoginActivity reads the editUsername and editPassword fields, then calls DatabaseHelper.checkUser(username, password). The helper queries the users table for an exact match on both columns. If a row is found, MainActivity is launched and LoginActivity is finished.
checkUser method in DatabaseHelper queries the SQLite users table:
#loginForm submit handler normalises the entered identity to lower-case and then searches getUsers() for a record where either username or email (both compared case-insensitively) matches the input and the password is identical. On success, the authenticated flag is written to sessionStorage and the user is sent to events.html.
Session Handling
- Browser
After a successful login, If the flag is missing — because the user navigated directly to
app.js stores the string 'true' at sessionStorage['punctuowlity-authenticated']. When events.html loads, the very first thing app.js checks is whether that key is present:events.html without logging in, or because the tab was closed and reopened — they are immediately redirected back to index.html. sessionStorage is tab-scoped and is cleared automatically when the tab (or browser window) is closed, so sessions never persist across browser restarts.In the browser,
saveUsers writes the serialised users array to every available storage (both localStorage and sessionStorage) in a single call, so the data is accessible from either:getUsers() (which calls accountStorage.get()) iterates through the available stores in order and returns the first valid array it finds, providing a degree of redundancy if one storage type is unavailable.