Skip to content

Commit

Permalink
contributing guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Irere123 committed Nov 12, 2024
1 parent c750643 commit 80ce8ee
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 5 deletions.
54 changes: 54 additions & 0 deletions CONTRIBUTING.md
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
```
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"db:migrate": "drizzle-kit migrate",
"db:gen": "drizzle-kit generate"
"db:migrate": "drizzle-kit migrate --config drizzle.config.ts",
"db:gen": "drizzle-kit generate --config drizzle.config.ts",
"db:studio": "drizzle-kit studio --port 4000 --verbose --config drizzle.config.ts"
},
"dependencies": {
"@auth/drizzle-adapter": "^1.7.0",
Expand Down
5 changes: 4 additions & 1 deletion src/components/projects/edit-team-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ import {
selectUserSchema,
} from "@/modules/actions/utils";
import { selectTeamMember } from "@/modules/actions/select-team-member";


import { cn } from "@/lib/utils";
import { editTeam } from "@/modules/actions/edit-team";
import { toast } from "@/hooks/use-toast";
import { revalidateProject } from "@/modules/actions/revalidate-project";
import { LoadingSpinner } from "../icons";
import { Button } from "../ui/button";
import { buttonLinkVariants } from "../ui/button-link";
import { Input } from "../ui/input";

export function EditTeamForm({
props,
Expand Down Expand Up @@ -80,7 +83,7 @@ export function EditTeamForm({
<div className="flex flex-col space-y-4 py-8">
<form action={formAction}>
<div className="relative">
<input
<Input
{...register("name")}
required
autoFocus
Expand Down
20 changes: 18 additions & 2 deletions src/modules/auth/index.ts
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,
});

0 comments on commit 80ce8ee

Please sign in to comment.