-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
79 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
|
||
# Contributing Guidelines | ||
|
||
|
||
Thank you for considering contributing to Relaunch project! We appreciate your help in making this project better. Below are the guidelines to help you get started. | ||
|
||
|
||
### Clone the Repository | ||
|
||
Clone the repository to your local machine: | ||
# Start Generation Here | ||
|
||
```bash | ||
|
||
git clone https://github.com/your-username/relaunch.git | ||
cd relaunch | ||
``` | ||
|
||
## Setting Up the Project Locally | ||
|
||
To set up this project on your local machine, please follow these steps: | ||
|
||
### Prerequisites | ||
|
||
1. **Node.js**: Ensure you have Node.js installed. You can download it from [nodejs.org](https://nodejs.org/). | ||
2. **Yarn**: This project uses Yarn as a package manager. Install it globally if you haven't already: | ||
```bash | ||
npm install --global yarn | ||
``` | ||
|
||
3. **Turso**: You will need a Turso database. Sign up at [turso.io](https://turso.io/) and create a new database. | ||
|
||
|
||
# Install dependencies | ||
|
||
```bash | ||
|
||
pnpm install | ||
``` | ||
|
||
# Set up environment variables | ||
|
||
```bash | ||
cp .env.example .env | ||
``` | ||
# Run database migrations | ||
```bash | ||
pnpm db:migrate | ||
``` | ||
|
||
# Start the development server | ||
```bash | ||
pnpm dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,33 @@ | ||
import NextAuth from "next-auth"; | ||
import Google from "next-auth/providers/google"; | ||
import GoogleProvider from "next-auth/providers/google"; | ||
import { DrizzleAdapter } from "@auth/drizzle-adapter"; | ||
|
||
import { db } from "@/db"; | ||
|
||
export const { handlers, signIn, signOut, auth } = NextAuth({ | ||
adapter: DrizzleAdapter(db), | ||
providers: [Google], | ||
providers: [ | ||
GoogleProvider({ | ||
clientId: process.env.GOOGLE_CLIENT_ID, | ||
clientSecret: process.env.GOOGLE_CLIENT_SECRET, | ||
}), | ||
], | ||
pages: { | ||
error: "/auth/error", | ||
newUser: "/dashboard", | ||
signIn: "/auth/sign-in", | ||
signOut: "/auth/sign-out", | ||
}, | ||
logger: { | ||
debug: (code, metadata) => { | ||
console.debug(`[NextAuth][DEBUG][${code}]`, metadata); | ||
}, | ||
error: (error) => { | ||
console.error(`[NextAuth][ERROR]`, error); | ||
}, | ||
warn: (code) => { | ||
console.warn(`[NextAuth][WARN][${code}]`); | ||
}, | ||
}, | ||
trustHost: true, | ||
}); |