Welcome to JC Stack
This will serve as a starting point for your next project or hack
Following are the packages installed with this starter pack
- Tailwindcss
- Framer Motion
- Recoil
- React Query
- Next Auth
- Add a
AUTH_SECRET
in .env to be used as a secret key - Wrap your component with
<ProtectedRoute>
to make it accessible only on session - Similarly use
<RoleRoute role="">
to make it accessible only on session and role - Helper hooks are provided with the package to get session and role details
- Check
/api/auth/[...nextauth]/route.ts
to make any changes and add logic to authorize user - Visit
/protected
,/protected/admin
and/protected/user
to see the implementation
- Add a
- Prisma
- Shadcn
Workspace for formatting on push and pull to GitHub is configured as well
Following npm commands are present as well
npm run lint:check
- to check for linting issuesnpm run lint:fix
- to automatically fix linting issuesnpm run format:check
- to check for formatting issuesnpm run format:fix
- to automatically fix formatting issues
Authentication Status