Commit Graph

26 Commits

Author SHA1 Message Date
Aaron William Po
0d3785ad1a Add environment variable validation and parsing
Adds a validation schema for the application's environment variables using the Zod library. The parsed environment variables are then exported as constants that can be imported throughout the application, replacing the direct use of process.env.
2023-04-07 11:37:30 -04:00
Aaron William Po
7db7b8264f Switch database to cockroach db and remove height on comment card 2023-04-05 21:38:36 -04:00
Aaron William Po
8414a7645d Fix glitch where like count would just show up as '0' 2023-04-04 22:13:27 -04:00
Aaron William Po
796a5fce3f Styling changes and refactor
Switch google fonts to use Next.js font optimization, animate comment fade in, and refactor beer like handler and comment submit handler.
2023-04-04 20:51:29 -04:00
Aaron William Po
a4362a531c Add custom hooks for time distance and retrieving like count
Documentation added to all custom hooks
2023-04-03 23:32:32 -04:00
Aaron William Po
801a3c8ad3 Refactor comment cards out of comment section 2023-04-02 22:10:04 -04:00
Aaron William Po
f8ecaa51b5 Update beer like button to use custom hook to load like status 2023-04-02 21:51:10 -04:00
Aaron William Po
de3964dbfa Rewrote beer by id page comments to load on client 2023-04-02 21:50:42 -04:00
Aaron William Po
b69dbc95b4 Work on brewery page, refactors
Refactor query types to explicitly use z.infer
2023-03-31 21:13:35 -04:00
Aaron William Po
d8a8dad37f Refactor beer by id page
Extracted services to separate files.
2023-03-27 19:02:45 -04:00
Aaron William Po
6b12cb72c5 Refactor BeerPostHeader, refactor login and register
- Updated BeerPostHeader in /id page to use semantic HTML tags
- Removed the getServerSidesProps fn in /login and /register. Moved the redirect logic over to the client, will redirect on the client side.
- Added delete BeerPost option on the edit page.
2023-03-15 21:30:26 -04:00
Aaron William Po
584e3b349f Implement confirm user functionality
This commit adds the necessary functionality to confirm a user's account.

It includes the addition of a new column in the user table to track whether an account is confirmed or not, and the implementation of JWT for confirmation tokens.

This commit integrates the SparkPost API as well as React Email to send dynamic emails for whatever purpose.

Upon user registration, a confirmation email will be sent to the user.
2023-03-13 22:35:57 -04:00
Aaron William Po
472ead9abd Refactoring beer by id page, add delete comment
Refactored the comments ui into various new components, added the delete beer comment by id feature.
2023-03-03 21:28:44 -05:00
Aaron William Po
11b3304c54 Update page auth HOF type definitions
Added vercel config, update packages
2023-02-25 19:17:49 -05:00
Aaron William Po
6f604b9768 Change font, add meta title/desc to 404 page 2023-02-20 22:57:00 -05:00
Aaron William Po
c818dc6525 BeerPostQueryResult type now inferred from zod schema 2023-02-20 14:26:58 -05:00
Aaron William Po
4cd2ab476f Formatting changes 2023-02-20 09:09:45 -05:00
Aaron William Po
d50ce7497b Add like count and extracted like button out of parent 2023-02-15 21:35:18 -05:00
Aaron William Po
80261a713b Add comments pagination, login and register pages 2023-02-13 10:56:09 -05:00
Aaron William Po
dbd342fd3e Refactor codebase, format 2023-02-09 04:03:52 -05:00
Aaron William Po
c2eb4d1371 Add github actions, refactor seed and beer p likes 2023-02-09 02:23:18 -05:00
Aaron William Po
d8ae58844c Remove userContext from pages dir 2023-02-08 07:57:55 -05:00
Aaron William Po
f6880deeb6 add user context and likes 2023-02-08 07:43:59 -05:00
Aaron William Po
5cf2087cd1 Refactored api services into sep files. Client fix
Fixed hydration errors in beers/[id] by implementing timeDistanceState
2023-01-31 23:16:43 -05:00
Aaron William Po
0b96c8f1f5 Did more work to beer post page, seed
Worked on comments and beer recs features. Fine tuning database seed amounts.
2023-01-29 21:53:05 -05:00
Aaron William Po
fe277d5964 Refactor api requests and components out of pages 2023-01-28 21:05:20 -05:00