https://github.com/djimenezweb/mern-auth
Basic full stack authentication system built with Express, React and shadcn/ui
https://github.com/djimenezweb/mern-auth
bcrypt express jwt mern mern-stack mongodb mongoose node react shadcn-ui tailwindcss
Last synced: 2 months ago
JSON representation
Basic full stack authentication system built with Express, React and shadcn/ui
- Host: GitHub
- URL: https://github.com/djimenezweb/mern-auth
- Owner: djimenezweb
- License: mit
- Created: 2024-11-13T11:25:27.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-11-27T15:46:54.000Z (6 months ago)
- Last Synced: 2025-01-22T03:08:38.127Z (4 months ago)
- Topics: bcrypt, express, jwt, mern, mern-stack, mongodb, mongoose, node, react, shadcn-ui, tailwindcss
- Language: TypeScript
- Homepage: https://mern-auth-o1gw.onrender.com/
- Size: 623 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MERN Auth
Basic custom username/password auth system.
Live demo: https://mern-auth-o1gw.onrender.com
- Session based
- Role authorization (user, admin)
- Authenticated users can log in and see their own open sessions.
- Admins can delete users, invalidate sessions and close other user's sessions.[](https://mern-auth-o1gw.onrender.com)
## Back End
- Node.js + Express
- Refresh and Access Tokens (JWT)
- Hashed passwords (bcrypt)
- HttpOnly Cookies (cookie-parser)
- MongoDB & Mongoose
- Custom middleware
- Protected endpoints
- Auto delete expired sessions from database## Front End
- Vite + React + TypeScript
- Shadcn/ui
- Tailwind CSS
- Icons: [Lucide](https://lucide.dev/) + [react-icons](https://react-icons.github.io/react-icons/)
- Fonts: [Jost](https://indestructibletype.com/Jost.html) + [JetBrainsMono](https://www.jetbrains.com/lp/mono/)## Usage
- Create a MongoDB database and copy your URI
- Create new `.env` files following the `.env.example` files in both `client` and `server` folders### Install server dependencies and run:
```bash
cd server
npm install
npm run dev
```### Install client dependencies and run:
```bash
cd client
npm install
npm run dev
```## License
Licensed under the MIT License. Check the [LICENSE](./LICENSE.md) file for details.