diff --git a/.gitignore b/.gitignore
index 9a6393f..1f67859 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
/.pnp
.pnp.js
package-lock.json
+.env*
# testing
/coverage
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b7bb20a..6759ddd 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,17 +6,23 @@ Thank you for your interest in contributing to the Hacktoberfest Projects Finder
1. Fork the repository on GitHub.
2. Clone your forked repository:
+
```sh
git clone https://github.com/your-username/hacktoberfest-projects.git
```
+
3. Navigate to the project directory:
+
```sh
cd hacktoberfest-projects
```
+
4. Install dependencies (we recommend using `pnpm`):
+
```sh
pnpm install
```
+
5. Copy the `.env.example` file to `.env.local` and fill in the required environment variables.
## Creating a GitHub OAuth Application
@@ -27,9 +33,11 @@ To use GitHub authentication in the project, you need to create a GitHub OAuth a
2. Navigate to "Developer settings" > "OAuth Apps".
3. Click on "New OAuth App".
4. Fill in the application details:
+
- Application name: "Hacktoberfest Projects Finder" (or your preferred name)
- Homepage URL: `http://localhost:3000` (for local development)
- Authorization callback URL: `http://localhost:3000/api/auth/callback/github`
+
5. Click "Register application".
6. On the next page, you'll see your Client ID. Click "Generate a new client secret" to create your Client Secret.
7. Copy the Client ID and Client Secret to your `.env.local` file.
@@ -41,25 +49,39 @@ Xata is used as the database for this project. Follow these steps to set it up:
1. Sign up for a Xata account at https://lite.xata.io/
2. Create a new workspace and database from Xata dashboard
3. Install the Xata CLI globally:
+
```sh
npm install -g "@xata.io/cli@latest"
```
+
4. Authenticate with Xata:
+
```sh
xata auth login
```
+
5. Initialize the database:
+
```sh
xata init
```
+
5. Upload the database schema:
+
```sh
xata schema upload db-schema.json
```
+6. Generate the Xata client:
+
+```sh
+xata codegen
+```
+
## Environment Variables
Create a `.env.local` file in the root of the project and add the following variables:
+
```sh
AUTH_SECRET="" # A random string
AUTH_URL="" # Should be http://localhost:3000 for local development
@@ -72,13 +94,14 @@ NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="" # Optional
NEXT_PUBLIC_ANALYTICS_WEBSITE_ID="" # Optional
```
-Make sure to fill in the required values for each variable. The `AUTH_SECRET` should be a random string, and `AUTH_URL` should be set to `http://localhost:3000` for local development. The `XATA_BRANCH` should typically be set to "main" unless you're using a different branch.
+Make sure to fill in the required values for each variable. The `AUTH_SECRET` should be a random string, and `AUTH_URL` should be set to `http://localhost:3000` for local development. The `XATA_BRANCH` should typically be set to "main" unless you're using a different branch.
-Remember to remove env variables that are optional and you are empty, they will cause validation errors
+Remember to remove env variables that are optional and you are empty, they will cause validation errors
## Running the Project
After setting up the environment variables, you can start the development server:
+
```sh
pnpm dev
```
@@ -88,14 +111,18 @@ The application should now be running at `http://localhost:3000`.
## Making Contributions
1. Create a new branch for your feature or bug fix:
+
```sh
git checkout -b feature/your-feature-name
```
+
2. Make your changes and commit them with a descriptive commit message.
3. Push your changes to your fork:
+
```sh
git push origin feature/your-feature-name
```
+
4. Create a pull request from your fork to the main repository.
Please ensure your code follows the project's coding standards and includes appropriate tests if applicable.
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 39ed735..eb2bf00 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -1,21 +1,24 @@
-import { defineConfig } from "eslint/config";
-import path from "node:path";
-import { fileURLToPath } from "node:url";
-import js from "@eslint/js";
-import { FlatCompat } from "@eslint/eslintrc";
+import { defineConfig } from 'eslint/config';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+import js from '@eslint/js';
+import { FlatCompat } from '@eslint/eslintrc';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
- baseDirectory: __dirname,
- recommendedConfig: js.configs.recommended,
- allConfig: js.configs.all
+ baseDirectory: __dirname,
+ recommendedConfig: js.configs.recommended,
+ allConfig: js.configs.all
});
-export default defineConfig([{
- extends: compat.extends("next/core-web-vitals"),
+export default defineConfig([
+ {
+ extends: compat.extends('next/core-web-vitals'),
rules: {
- "@next/next/no-img-element": 0,
- },
-}]);
\ No newline at end of file
+ '@next/next/no-img-element': 0,
+ 'react/no-unescaped-entities': 0
+ }
+ }
+]);
diff --git a/public/favicon.svg b/public/favicon.svg
new file mode 100644
index 0000000..9b88d7b
--- /dev/null
+++ b/public/favicon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/app/(public)/_components/button.tsx b/src/app/(public)/_components/button.tsx
index 4547cf7..93b78dd 100644
--- a/src/app/(public)/_components/button.tsx
+++ b/src/app/(public)/_components/button.tsx
@@ -11,15 +11,18 @@ export function Button({
...props
}: PropsWithChildren) {
return (
-
+
);
diff --git a/src/app/(public)/_components/header.tsx b/src/app/(public)/_components/header.tsx
index 8bbf09c..cfc4c10 100644
--- a/src/app/(public)/_components/header.tsx
+++ b/src/app/(public)/_components/header.tsx
@@ -6,33 +6,36 @@ import { BsPeopleFill } from 'react-icons/bs';
import { SearchForm } from './search-form';
import { auth } from '@/auth';
import { signInAction, signOutAction } from '../../actions';
+import { LogoIconsSvg } from '@/components/Icons';
+import { Button } from './button';
+import { MobileMenu } from './mobile-menu';
export async function Header() {
const session = await auth();
return (
-
-
-
-
-
+
+
+
+
+
-
+ {/* Desktop Search - Hidden on mobile */}
+