Skip to content

100xdevs job board - temp domain attached ( will update soon )

Notifications You must be signed in to change notification settings

code100x/job-board

Repository files navigation

Project Name: Job Board

All about job board
Project Status

Table of Contents

Description

Job Board is a platform designed to connect employers with potential employees. Employers can post job listings, and job seekers can apply for these positions. The application ensures a seamless and efficient job search and hiring process.

Technologies

  • Web-app: Next.Js, TypeScript
  • Database: Prisma ORM, Postgres
  • Authentication: NextAuth
  • Containerization: Docker

Getting Started

To get started with the Job Board app, follow these steps:

  1. Clone the repository:

    git clone https://github.com/yourusername/job-board

Follow these steps to set up the repository locally and run it.

Configuration

  1. Create a .env file in the root folder of your project. Update it following the convention of the .env.example file. Here's an example:

    #
    # Database
    #
    DATABASE_URL="postgres://postgres:password@localhost:5432/postgres"
    
    #
    # AUTH
    #
    NEXTAUTH_SECRET=
    NEXTAUTH_URL="http://localhost:3000"
    
    #
    # Bunny CDN
    #
    CDN_API_KEY=
    CDN_BASE_UPLOAD_URL=
    CDN_BASE_ACCESS_URL=
    
    NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=
    
    #
    # Email SMTP credentials
    #
    [email protected]
    EMAIL_PASSWORD=
    
    #
    # Google OAuth credentials
    #
    GOOGLE_CLIENT_ID=
    GOOGLE_CLIENT_SECRET=
  2. To generate AUTH_SECRET,

    Run this command in your terminal:

    openssl rand -base64 33

    or

    Run in browser

Running the Project with Docker

docker compose up --build

Running the Project without Docker

  1. Install the necessary dependencies:

    npm install
  2. Sync & Seed your database:

    npm run db:seed
  3. Start the development server:

    npm run dev

Now, you can run the project and make changes as needed.

Test User Credentials

Emails: '[email protected], [email protected]';
Password: '123456';

Steps to create a BunnyCDN storage for this repo:

  1. Create a storage zone:

Create a storage zone

  1. Connect the storage zone to a pull zone:

Connect the storage zone to a pull zone

  1. Set environment variables:

    Go to the FTP & API Access section in the storage zone and add the following environment variables:

    CDN_API_KEY=<your-api-key>

    Which you can find in the storage -> [storage name] -> FTP & API Access section

    CDN_API_KEY

CDN_BASE_UPLOAD_URL=<your-cdn-base-upload-url>

Which is https://[your-hostname]/[storage-name]/[any folder name you might have added otherwise empty]

CDN_BASE_UPLOAD_URL


CDN_BASE_ACCESS_URL=<your-cdn-base-access-url>

Which is https://[your-pull-zone-hostname]/[any folder name you might have added otherwise empty] or get link from the dashboard as mentioned below

 CDN_BASE_ACCESS_URL

Steps to Set Up Google Maps Platform API Key

To use the Google Maps API in your applications, follow the steps below to create and set up your API key.

Step 1: Go to Google Cloud Console

  1. Navigate to the Google Cloud Console.
  2. If you don’t have a Google account, create one and sign in.

Step 2: Create a New Project

  1. In the Cloud Console, click on the Select a project dropdown at the top.
  2. Click New Project to create a new project.
  3. Give your project a name, select the organization (optional), and choose the billing account.
  4. Click Create.

Step 3: Google Maps Platform

  1. Search Google Maps Platform in the Console search bar Screenshot 2024-09-22 at 10 15 15 AM

  2. If your account is not setup yet , finish your account setup Screenshot 2024-09-22 at 10 02 59 AM

3.After Completeing account setup , select the "Keys and Credentails" Section. 4.Then select the Create Credentials option , under which you can select the "API Key Option" Screenshot 2024-09-22 at 10 05 36 AM

  1. You will receive a API Key , add the key to the NEXT_PUBLIC_GOOGLE_MAPS_API_KEY in the .env Screenshot 2024-09-22 at 10 19 33 AM

Step 4: Changes required to make it work on localhost

  1. Although the documentation mentions that without restriction , the API key will work everywhere, that is not the case for http requests.

  2. Add a restriction and mention your localhost along with your port for it to start working on local , and save and continue Screenshot 2024-09-22 at 10 06 44 AM

  3. to test navigate to the http://localhost:3000/create , and test the "Where is the job located" input.