Skip to content
/ nextjs-with-auth Public template

Modern Next.js auth template with secure JWT flow—access tokens in memory and refresh tokens in HttpOnly cookies.

License

Notifications You must be signed in to change notification settings

Shotix/nextjs-with-auth

Repository files navigation

NextJS / React Starter Project

This project serves as a basic starter template for a NextJS / React application that includes login and register functionality. It is designed to work seamlessly with my backend project named springboot-with-auth.

Features

  • NextJS: A React framework for server-side rendering and static site generation.
  • React: A JavaScript library for building user interfaces.
  • Authentication: Login and register functionality integrated with the backend.
  • Seamless Integration: Designed to work with my springboot-with-auth project

Getting Started

Prerequisites

  • Node.js
  • npm or yarn

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/your-repo-name.git
  2. Navigate to the project directory:
    cd your-repo-name
  3. Install the dependencies:
    npm install
    or
    yarn install

Running the Project

  1. Start the development server:
    npm run dev
    or
    yarn dev
  2. Open your browser and navigate to http://localhost:3000.

Project Structure

  • app/: Contains the main frontend code (pages, components, styles, etc.).
  • contexts/: Contains the React contexts.
  • data/: Contains the data models.
  • services/: Contains the API services.
  • utils/: Contains utility functions.

Backend Integration

This project is designed to work with my springboot-with-auth backend project. Make sure to set up and run the backend project to enable the authentication functionality.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for more details.

About

Modern Next.js auth template with secure JWT flow—access tokens in memory and refresh tokens in HttpOnly cookies.

Topics

Resources

License

Stars

Watchers

Forks