Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rearchitecture #10

Merged
merged 99 commits into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
ec0cc28
Update Next to latest v13
edwardshturman May 27, 2023
7053d1a
Extract `SessionProvider` to client component
edwardshturman May 27, 2023
a56f573
Add App Router root layout
edwardshturman May 27, 2023
d02c8cf
Extract conditional Sidebar rendering to component
edwardshturman May 27, 2023
77718e3
Use new `usePathname` client component hook
edwardshturman May 27, 2023
7fce098
Extract sign in button to client component
edwardshturman May 27, 2023
c784115
Migrate sign in page to App Router
edwardshturman May 27, 2023
16884d7
Consolidate user APIs
edwardshturman May 27, 2023
2b195fa
Migrate Auth.js APIs to App Router
edwardshturman May 27, 2023
0ebef49
Migrate cue generation API to App Router
edwardshturman May 27, 2023
10c1c3a
Migrate card invites to App Router
edwardshturman May 27, 2023
e3c61d8
Optimize sidebar code
edwardshturman May 27, 2023
d813436
Fix Edge Function config export
edwardshturman May 27, 2023
5ab2c18
Add auth policies & logic (#11)
edwardshturman Jul 21, 2023
26eb9a8
Move `/profile` route to App Router
edwardshturman Jul 21, 2023
a13f3c8
Move user fetching and redirecting into async page
edwardshturman Jul 21, 2023
5e44f67
Add session callback to pass Google ID
edwardshturman Jul 24, 2023
f274f41
Remove `/api/user` route handlers
edwardshturman Jul 24, 2023
b15e89e
Expand user management functions
edwardshturman Jul 24, 2023
cd41587
Distinguish fetching user session vs. db data
edwardshturman Jul 24, 2023
2ffd1eb
Fix conditional for checking if a user exists
edwardshturman Jul 24, 2023
a53edd9
Create user if they don't exist on sign-in
edwardshturman Jul 25, 2023
8fc2d96
Add invite validation logic
edwardshturman Jul 25, 2023
12a2003
Dynamically set a user's `invitesRemaining`
edwardshturman Jul 25, 2023
fc1abce
Add `invite-only` auth policy logic
edwardshturman Jul 25, 2023
ff8ed0a
Rename `InviteCode` model to `Invite` for clarity
edwardshturman Jul 25, 2023
d0d9420
Use new user & invite logic in `/profile`
edwardshturman Jul 25, 2023
1cb37b5
Switch `/api/user` dependents to `getUser()`
edwardshturman Jul 25, 2023
88b601c
Use Doppler
edwardshturman Jul 25, 2023
2a55eb4
Fix `session` callback accessing undefined `id`
edwardshturman Jul 25, 2023
6dc9d9c
Revert yarn setup
edwardshturman Jul 25, 2023
1f3e3c7
Delete yarn cache files
edwardshturman Jul 25, 2023
8b46dcb
Update package.json
edwardshturman Jul 26, 2023
22e2764
Revert to npm (#14)
edwardshturman Jul 26, 2023
e289e66
Fix node modules not being ignored
edwardshturman Jul 26, 2023
c5fa6a1
Patch missing swc dependencies
edwardshturman Jul 26, 2023
282212e
Apply sidebar layout shift fix (#15)
edwardshturman Jul 26, 2023
98aeae8
Add `generations` object[] for usage tracking
edwardshturman Jul 31, 2023
368971c
Fix importing default export as named
edwardshturman Jul 31, 2023
58dbe6a
Fix user auth check, use `sessionData`
edwardshturman Jul 31, 2023
5a7b1f7
Properly append user's Google ID to session object
edwardshturman Jul 31, 2023
2173784
Rely on pages to render sidebar themselves
edwardshturman Jul 31, 2023
64782a0
Move data fetching from sidebar into relying pages
edwardshturman Jul 31, 2023
62a9ade
Extract Feedback widget to client component
edwardshturman Jul 31, 2023
fa3692c
Switch to own `getSessionData` dep for consistency
edwardshturman Jul 31, 2023
4533eea
Hide "View saved cues" button
edwardshturman Jul 31, 2023
ecc8af7
Fix `/profile` redirect loop
edwardshturman Jul 31, 2023
3eaa864
Convert `/profile` to server component
edwardshturman Jul 31, 2023
5a55cb5
Add TODOs for next steps
edwardshturman Jul 31, 2023
514231f
Upgrade to experimental NextAuth v5
edwardshturman Aug 1, 2023
d9581fe
Upgrade configuration
edwardshturman Aug 2, 2023
282398b
Update server-side auth for server components
edwardshturman Aug 2, 2023
3c0fd68
Upgrade server-side auth for `getServerSideProps`
edwardshturman Aug 2, 2023
86eddee
Remove token fetching & `session` callback
edwardshturman Aug 2, 2023
53a55fb
Optionally pass in `auth` parameters
edwardshturman Aug 2, 2023
b92db7a
Consolidate auth deps for consistency
edwardshturman Aug 2, 2023
1a51238
Fix pfp rendering
edwardshturman Aug 2, 2023
bd7c28d
Remove default edge runtime for auth routes
edwardshturman Aug 2, 2023
131fc61
Upgrade to experimental NextAuth v5 (#18)
edwardshturman Aug 2, 2023
eb3a459
Install Vercel KV
edwardshturman Aug 3, 2023
65378c1
Create `/api/hello` route for testing auth status
edwardshturman Aug 3, 2023
3be5cdb
Fix redirect loop for new users
edwardshturman Aug 3, 2023
50dee9d
Explicitly deny access if auth conditions unmet
edwardshturman Aug 3, 2023
b57f0ef
Rework user management for KV
edwardshturman Aug 3, 2023
1c23be5
Pass `authParams` to `getUser()` for Pages Router
edwardshturman Aug 3, 2023
398b2ae
Secure `/cue` page
edwardshturman Aug 3, 2023
cb0dcd8
Add TODO for migrating invites to Vercel KV
edwardshturman Aug 3, 2023
532aecf
Migrate to Vercel KV (#19)
edwardshturman Aug 3, 2023
2ade4be
Remove `user-schema` deps
edwardshturman Aug 4, 2023
c05e1f5
Create new user schema for KV
edwardshturman Aug 4, 2023
0974589
Switch to per-user hash
edwardshturman Aug 4, 2023
78cf3fb
Create generation schema
edwardshturman Aug 4, 2023
891bbc2
Copy invites from MongoDB to Vercel KV
edwardshturman Aug 5, 2023
80134f4
Refactor invite validation code for Vercel KV
edwardshturman Aug 5, 2023
e3d89cc
Separate cue gen wrapper and page
edwardshturman Aug 5, 2023
eb699a4
Call `checkAuth` properly
edwardshturman Aug 5, 2023
b19e682
Fix styles
edwardshturman Aug 5, 2023
4a1057f
Keep consistent style naming across Routers
edwardshturman Aug 5, 2023
4d8285a
Add generation construction helper function
edwardshturman Aug 8, 2023
951f484
Ensure live generations data is fetched, check age
edwardshturman Aug 8, 2023
6192a11
Push to user `generations` on generation call
edwardshturman Aug 8, 2023
160f91e
Limit generations to 10 a week
edwardshturman Aug 8, 2023
b9b7036
Handle user hitting rate limit gracefully
edwardshturman Aug 10, 2023
496c863
Tokenize notes and generated cues to get cost
edwardshturman Aug 12, 2023
a505840
Remove unused icons
edwardshturman Aug 12, 2023
f0cdbe1
Migrate invite cards to Vercel KV
edwardshturman Aug 12, 2023
d48fa48
Move invite code page to App Router
edwardshturman Aug 12, 2023
666dac5
Clear invite code search param on `/profile`
edwardshturman Aug 12, 2023
2fd353e
Remove abstraction of invite status
edwardshturman Aug 12, 2023
e0260a8
Write helper function for getting all invite codes
edwardshturman Aug 12, 2023
275fc64
Make `invite-only` auth policy more restrictive
edwardshturman Aug 12, 2023
a14475b
Move `/redeem` to App Router
edwardshturman Aug 12, 2023
691abc2
Prevent signed-in users from using invite codes
edwardshturman Aug 12, 2023
3105bef
Approve auth if user exists (lol)
edwardshturman Aug 12, 2023
b103813
Remove Pages Router
edwardshturman Aug 12, 2023
fa0d8c2
Fix access denial for existing users (again lol)
edwardshturman Aug 12, 2023
80f03e9
Fix lint issues
edwardshturman Aug 12, 2023
2b71551
Bump to version `0.5.0`
edwardshturman Aug 12, 2023
3da078a
Merge branch 'dev' into meta/next-app-router-migration
edwardshturman Aug 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions .gitattributes

This file was deleted.

18 changes: 5 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules/
/.pnp
.pnp.js

# testing
/coverage

Expand All @@ -25,16 +30,3 @@ yarn-error.log*

# vercel
.vercel

# yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Swap the comments on the following lines if you don't wish to use zero-installs
# Documentation here: https://yarnpkg.com/features/zero-installs
!.yarn/cache
#.pnp.*
17,571 changes: 0 additions & 17,571 deletions .pnp.cjs

This file was deleted.

Loading