AuthSystem-RefreshJWTtoken-GoogleAuth-EmailVerification is a fullstack project that provides a robust authentication system. The backend is built with NestJS and the frontend with Next.js. The system includes JWT authentication with refresh tokens, authentication via Google, and email verification.
- User registration
- Account activation via email
- User login
- User logout
- Password recovery
- Password reset via email
- Retrieval of logged-in user information
- Listing of all users
- Registration, login, and password recovery interfaces
- Integration with the backend for authentication and authorization
- Authentication via Google
- Email verification
src: Contains all the backend source codedto: Data Transfer Objectsentities: Definition of database entitiesguards: Guards for route protectiontypes: Types and interfaces used in resolversusers: Contains the services and resolvers related to users
@nestjs/common,@nestjs/core: NestJS Framework@nestjs/graphql: GraphQL integration with NestJS@nestjs/jwt: JWT support@nestjs-modules/mailer: Email sendingbcrypt: Password encryptionprisma: ORM for database interactions
- build: nest build
- start: nest start
- start:dev: nest start --watch
- test: jest
- lint: eslint --fix
pages: Contains the Next.js application pagescomponents: Reusable componentsservices: API integrationcontexts: Authentication contexts and global state
next: React Framework for server-side renderingreact,react-dom: React Libraryaxios: HTTP requestsjsonwebtoken: JWT manipulation
- Node.js (LTS version recommended)
- Yarn or npm
-
Clone the repository: git clone https://github.com/LucasFonseca0/AuthSystem-RefreshJWTtoken-GoogleAuth-EmailVerification.git cd AuthSystem-RefreshJWTtoken-GoogleAuth-EmailVerification/servers
-
Install the dependencies:
npm installoryarn install -
Configure the environment variables in the
.envfile. -
Run the database migrations:
npx prisma migrate dev -
Start the development server:
npm run start:devoryarn start:dev
-
Navigate to the frontend directory:
cd ../clients/user-ui -
Install the dependencies:
npm installoryarn install -
Configure the environment variables in the
.env.localfile. -
Start the development server:
npm run devoryarn dev
-
Access the frontend in your browser: http://localhost:3000
-
Use the registration, login, password recovery features, etc.
- Fork the repository
- Create a new branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request

