https://github.com/sanyampunia/medusa-auth-starter
✨ Medusa.js Starter Template including complete auth-flow (with user-context) and protected routing.
https://github.com/sanyampunia/medusa-auth-starter
medusajs nextjs reacthookform tailwindcss
Last synced: 3 months ago
JSON representation
✨ Medusa.js Starter Template including complete auth-flow (with user-context) and protected routing.
- Host: GitHub
- URL: https://github.com/sanyampunia/medusa-auth-starter
- Owner: SanyamPunia
- Created: 2022-10-20T06:39:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-11T20:27:04.000Z (about 3 years ago)
- Last Synced: 2025-08-04T18:48:52.817Z (10 months ago)
- Topics: medusajs, nextjs, reacthookform, tailwindcss
- Language: TypeScript
- Homepage:
- Size: 2.36 MB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🏬 Medusa Auth Starter
A Starter Template which includes complete Medusa Authflow i.e Registration, User Login & Logout
## 🍀 Key Features
1. This starter template provides authentication workflow out of the box, so you don't have to re-invest your time building it from scratch.
2. Maintable folder structure and following Medusa's similar code practices.
3. Currently supporting version [`v.1.5.0`](https://github.com/medusajs/medusa/releases/tag/v1.5.0)
4. Tailwind CSS integration with Next.js for styling.
## 🌌 Tech Stack
- [Next.js](https://nextjs.org/) - Frontend Framework
- [Tailwind CSS](https://tailwindcss.com/) - CSS Utility Framework
- [Medusa.js](https://medusajs.com/) - ecom Platform
## 🌠 Sub Dependencies
- [React Hook Form](https://react-hook-form.com/)
- [React Query](https://tanstack.com/query/v4)
## 🔬 Local Setup & Installation
1. Start off by installing `medusa` client globally on your system
```bash
$ yarn global add @medusajs/medusa-cli
```
> 📌 Quick Note (By default)
>
> - Admin runs on PORT - 7000
> - Storefront runs on PORT - 8000
> - Backend runs on PORT - 9000
2. `cd` into each directory and install the dependencies
```bash
# Backend
cd backend
yarn install
# Admin
cd admin
yarn install
# Storefront
cd storefront
yarn install
```
3. The backend server should be running in the background while developing the application!
> ### 👤 Creating a new admin user
>
> - `cd` into the `backend` directory and run the following command
>
> ```bash
> $ medusa user -e some@email.com -p somepassword
> ```
>
> - This will create a new user which can be used to access the dashboard
4. Test the application by running the server, admin and storefront
```bash
# Backend
cd backend
yarn start
# Admin
cd admin
yarn start
# Storefront
cd storefront
yarn dev
```
## 🎯 Overview
1. Login Component

2. Register Component

3. Authenticated User (_any protected route_)

## 🥏 Deployment
Follow the deployment guide provided in the docs -
- Server - https://docs.medusajs.com/deployments/server/
- Admin - https://docs.medusajs.com/deployments/admin/
- Storefront - https://docs.medusajs.com/deployments/storefront/