https://github.com/syipmong/authentication-template
This project provides a comprehensive template for implementing authentication in your application. It includes setup and configuration for user registration, login, and session management.
https://github.com/syipmong/authentication-template
app atlas authentication authjs middleware mongo mongodb mongodb-atlas mongodb-database next15 nextjs prisma prisma-orm reactjs router typescript
Last synced: 6 months ago
JSON representation
This project provides a comprehensive template for implementing authentication in your application. It includes setup and configuration for user registration, login, and session management.
- Host: GitHub
- URL: https://github.com/syipmong/authentication-template
- Owner: Syipmong
- Created: 2025-02-28T19:41:39.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-08T09:03:26.000Z (7 months ago)
- Last Synced: 2025-04-03T05:30:11.872Z (6 months ago)
- Topics: app, atlas, authentication, authjs, middleware, mongo, mongodb, mongodb-atlas, mongodb-database, next15, nextjs, prisma, prisma-orm, reactjs, router, typescript
- Language: TypeScript
- Homepage:
- Size: 131 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Authentication Template
This project provides a comprehensive template for implementing authentication in your application. It includes setup and configuration for user registration, login, and session management.
## Features
- User registration
- User login
- Session management
- middleware
- Password hashing
- Token-based authentication## Getting Started
### Prerequisites
- Node.js
- npm or yarn### Installation
1. Clone the repository:
```bash
git clone https://github.com/syipmong/authentication-template.git
```2. Navigate to the project directory:
```bash
cd authentication-template
```3. Install dependencies:
```bash
npm install
```or
```bash
pnpm install
```### Configuration
1. Create a `.env` file in the root directory and add the following environment variables:
```env
DATABASE_URL=your_database_url
```### Running the Application
1. Start the development server:
```bash
npm start
```or
```bash
yarn start
```2. Open your browser and navigate to `http://localhost:3000`.
## Usage
- Register a new user by sending a POST request to `/auth/register` with the user's details.
- Login a user by sending a POST request to `/auth/login` with the user's credentials.
- Access protected routes by including the JWT token in the Authorization header.## Contributing
Contributions are welcome! Please open an issue or submit a pull request.
## License
## Acknowledgements
Special thanks to all the contributors and open-source projects that made this template possible.