How dev-dhanushkumar/oauth-2.0-repository works
Quick Auth is a React client backed by an Express authentication API. Users register or log in with email/password, may authenticate through Google OAuth, and can access protected profile data; password recovery uses an emailed reset link. The backend also manages JWT-backed sessions and persists user and reset-token data through Prisma. The source excerpts show key routing, login, OAuth, email, and persistence calls; some frontend-to-API links and unsampled route behavior are documented in the README rather than verified from their implementation.
Main entry points: auth.route.ts Auth routes · index.tsx Page router · auth.controller.ts Auth handlers · user.route.ts User routes
Components 29
React client
- React application
quickAuth-reactjs/src/App.tsx - Page router
quickAuth-reactjs/src/router/index.tsx - Login page
quickAuth-reactjs/src/pages/login.page.tsx - Registration page
quickAuth-reactjs/src/pages/register.page.tsx - Password recovery pages
quickAuth-reactjs/src/pages/forgotpassword.page.tsx - Password reset page
quickAuth-reactjs/src/pages/resetpassword.page.tsx - Profile page
quickAuth-reactjs/src/pages/profile.page.tsx - Home page
quickAuth-reactjs/src/pages/home.page.tsx - Client auth state
quickAuth-reactjs/src/store/index.ts - Google URL builder
quickAuth-reactjs/src/utils/getGoogleUrl.ts - Navigation and logout
quickAuth-reactjs/src/components/Header.tsx
API and identity
- Express app
quickAuth-nodejs/src/app.ts - Auth routes
quickAuth-nodejs/src/routes/auth.route.ts - Session routes
quickAuth-nodejs/src/routes/session.route.ts - User routes
quickAuth-nodejs/src/routes/user.route.ts - Auth handlers
quickAuth-nodejs/src/controllers/auth.controller.ts - Profile handler
quickAuth-nodejs/src/controllers/user.controller.ts - Request validation
quickAuth-nodejs/src/middleware/validate.ts - User schemas
quickAuth-nodejs/src/schema/user.schema.ts - JWT deserialization
quickAuth-nodejs/src/middleware/deserializeUser.ts - Protected access
quickAuth-nodejs/src/middleware/requireUser.ts - Google OAuth exchange
quickAuth-nodejs/src/services/session.service.ts
Persistence
- Prisma client
quickAuth-nodejs/src/utils/prisma.ts - PostgreSQL
quickAuth-nodejs/prisma/schema.prisma
External services
- Reset email rendering
quickAuth-nodejs/src/email/renderTemplate.ts - Email delivery
quickAuth-nodejs/src/email/transporter.ts
Other components
- User
- SMTP service
- Google OAuth
Connections 37
- User → React application: uses
README.md - React application → Page router: selects routes
quickAuth-reactjs/src/App.tsx - Page router → Login page: routes to
quickAuth-reactjs/src/router/index.tsx - Page router → Registration page: routes to
quickAuth-reactjs/src/router/index.tsx - Page router → Password recovery pages: routes to
quickAuth-reactjs/src/router/index.tsx - Page router → Password reset page: routes to
quickAuth-reactjs/src/router/index.tsx - Page router → Profile page: routes to
quickAuth-reactjs/src/router/index.tsx - Page router → Home page: routes to
quickAuth-reactjs/src/router/index.tsx - Login page → Client auth state: updates loading
quickAuth-reactjs/src/pages/login.page.tsx - Navigation and logout → Client auth state: reads and updates
quickAuth-reactjs/src/components/Header.tsx - Login page → Google URL builder: builds OAuth link
quickAuth-reactjs/src/pages/login.page.tsx - Login page → Auth routes: posts credentials
quickAuth-reactjs/src/pages/login.page.tsx - Navigation and logout → Auth routes: requests logout
quickAuth-reactjs/src/components/Header.tsx - Registration page → Auth routes: submits registration
README.md - Password recovery pages → Auth routes: requests reset email
README.md - Password reset page → Auth routes: submits new password
README.md - Profile page → User routes: requests profile
README.md - Express app → Auth routes: mounts
quickAuth-nodejs/src/app.ts - Express app → Session routes: mounts
quickAuth-nodejs/src/app.ts - Express app → User routes: mounts
quickAuth-nodejs/src/app.ts - Auth routes → Request validation: validates input
quickAuth-nodejs/src/routes/auth.route.ts - Request validation → User schemas: applies schemas
quickAuth-nodejs/src/routes/auth.route.ts - Auth routes → Auth handlers: dispatches handlers
quickAuth-nodejs/src/routes/auth.route.ts - Auth routes → JWT deserialization: checks session
quickAuth-nodejs/src/routes/auth.route.ts - Auth routes → Protected access: guards logout
quickAuth-nodejs/src/routes/auth.route.ts - User routes → Profile handler: dispatches profile
quickAuth-nodejs/src/routes/user.route.ts - User routes → JWT deserialization: loads user
quickAuth-nodejs/src/routes/user.route.ts - User routes → Protected access: guards access
quickAuth-nodejs/src/routes/user.route.ts - Auth handlers → Prisma client: reads and writes users
quickAuth-nodejs/src/controllers/auth.controller.ts - JWT deserialization → Prisma client: loads user
quickAuth-nodejs/src/middleware/deserializeUser.ts - Express app → Prisma client: connects database
quickAuth-nodejs/src/app.ts - Prisma client → PostgreSQL: persists records
README.md - Auth handlers → Google OAuth exchange: exchanges OAuth code
quickAuth-nodejs/src/controllers/auth.controller.ts - Google OAuth exchange → Google OAuth: requests tokens and profile
quickAuth-nodejs/src/services/session.service.ts - Auth handlers → Reset email rendering: renders reset message
quickAuth-nodejs/src/controllers/auth.controller.ts - Auth handlers → Email delivery: sends reset email
quickAuth-nodejs/src/controllers/auth.controller.ts - Email delivery → SMTP service: delivers mail
README.md