https://github.com/haravetskyy/magic-hut
An authentication service for Harbor Task
https://github.com/haravetskyy/magic-hut
authentication nextjs prisma-orm shadcn-ui typescript
Last synced: about 2 months ago
JSON representation
An authentication service for Harbor Task
- Host: GitHub
- URL: https://github.com/haravetskyy/magic-hut
- Owner: haravetskyy
- Created: 2025-01-18T12:28:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-23T18:44:01.000Z (over 1 year ago)
- Last Synced: 2025-02-23T19:35:03.251Z (over 1 year ago)
- Topics: authentication, nextjs, prisma-orm, shadcn-ui, typescript
- Language: TypeScript
- Homepage:
- Size: 6.35 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Magic Hut 
An authentication service for [Harbor Task](https://github.com/haravetskyy/harbor-task).
---
Here are instructions on how to use the code from this project to implement authentication in your own project.
## **Prerequisites**
Ensure you have the following installed:
- **Node.js** (v18 or later)
- **pnpm**
- **Docker** and **Docker Compose**
Also ensure you have set up the following things:
- **Arcjet** key
- **better-auth** secret
- **SendGrid** API key
- **Email address** with _SMTP_
## **Getting Started**
### **1. Clone the Repository**
```bash
git clone https://github.com/haravetskyy/harbor-task.git
cd harbor-task
```
---
### **2. Configure Environment Variables**
The project requires environment variables to function properly. To assist you, `.env.example` file is provided in the `root` directory.
These file serves as template, listing all necessary variables. You need to copy it to its respective `.env` files and fill it with valid data specific to your setup.
---
### **3. Install Dependencies**
Install all required Node.js packages :
```bash
pnpm install
```
---
### **4. Run All Essential Scripts**
You need to execute these scripts to ensure everything works correctly.
#### **4.1. Start the Development Database**
```bash
pnpm db:dev:up
```
This script initializes and starts the development database.
#### **4.2. Apply Prisma Migrations**
```bash
pnpm prisma:dev:deploy
```
This command applies the Prisma migrations to the database.
#### **4.3. Generate Prisma Client**
```bash
pnpm prisma:generate
```
This script generates the Prisma client based on the Prisma schema.
---
### **5. Start the Application**
```bash
pnpm dev
```
Open [http://localhost:1050](http://localhost:1050) with your browser to see the result.