Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepanshuMishraa committed Nov 1, 2024
2 parents 97dc5a2 + a8d6364 commit 79554b4
Show file tree
Hide file tree
Showing 106 changed files with 5,131 additions and 574 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ bun.lockb
package-lock.json
yarn.lock

**/public/sw.js
**/public/workbox-*.js
**/public/worker-*.js
**/public/sw.js.map
**/public/workbox-*.js.map
**/public/worker-*.js.map
6 changes: 3 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// next.config.js
import { fileURLToPath } from 'node:url';
import createJiti from 'jiti';

Expand All @@ -20,12 +21,11 @@ const nextConfig = {
remotePatterns: [
{
protocol: 'https',
hostname: 'job-board.b-cdn.net', // Change this to your CDN domain
hostname: 'job-board.b-cdn.net',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
// Change this to your CDN domain
},
{
protocol: 'https',
Expand All @@ -39,4 +39,4 @@ const nextConfig = {
},
};

export default nextConfig; // ES module export
export default nextConfig;
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@mui/material": "^6.1.3",
"@prisma/client": "5.18.0",
"@radix-ui/react-accordion": "^1.2.0",
"@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-checkbox": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.2",
Expand Down Expand Up @@ -79,6 +80,7 @@
"react": "^18",
"react-day-picker": "^8.10.1",
"react-dom": "^18",
"react-dropzone": "^14.2.10",
"react-hook-form": "^7.52.2",
"react-icons": "^5.2.1",
"react-quill": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "resumeUpdateDate" TIMESTAMP(3);
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
-- CreateEnum
CREATE TYPE "DegreeType" AS ENUM ('BTech', 'MTech', 'BCA', 'MCA');

-- CreateEnum
CREATE TYPE "FieldOfStudyType" AS ENUM ('AI', 'Machine_Learning', 'CS', 'Mechanical');

-- AlterTable
ALTER TABLE "Project" ADD COLUMN "isFeature" BOOLEAN NOT NULL DEFAULT false;

-- AlterTable
ALTER TABLE "User" ADD COLUMN "about" TEXT,
ADD COLUMN "contactEmail" TEXT,
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN "discordLink" TEXT,
ADD COLUMN "githubLink" TEXT,
ADD COLUMN "linkedinLink" TEXT,
ADD COLUMN "portfolioLink" TEXT,
ADD COLUMN "twitterLink" TEXT;

-- CreateTable
CREATE TABLE "Education" (
"id" SERIAL NOT NULL,
"instituteName" TEXT NOT NULL,
"degree" "DegreeType" NOT NULL,
"fieldOfStudy" "FieldOfStudyType" NOT NULL,
"startDate" TIMESTAMP(3) NOT NULL,
"endDate" TIMESTAMP(3),
"userId" TEXT NOT NULL,

CONSTRAINT "Education_pkey" PRIMARY KEY ("id")
);

-- AddForeignKey
ALTER TABLE "Education" ADD CONSTRAINT "Education_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
100 changes: 68 additions & 32 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,50 @@ datasource db {
}

model User {
id String @id @default(cuid())
name String
email String @unique
password String?
avatar String?
isVerified Boolean @default(false)
role Role @default(USER)
id String @id @default(cuid())
name String
email String @unique
password String?
avatar String?
isVerified Boolean @default(false)
role Role @default(USER)
emailVerified DateTime?
jobs Job[]
skills String[]
experience Experience[]
project Project[]
resume String?
oauthProvider OauthProvider?
oauthId String?
jobs Job[]
skills String[]
experience Experience[]
project Project[]
resume String?
oauthProvider OauthProvider? // Tracks OAuth provider (e.g., 'google')
oauthId String?
createdAt DateTime @default(now())
blockedByAdmin DateTime?
onBoard Boolean @default(false)
bookmark Bookmark[]
company Company? @relation("UserCompany")
companyId String? @unique
onBoard Boolean @default(false)
bookmark Bookmark[]
company Company? @relation("UserCompany")
companyId String? @unique
education Education[]
resumeUpdateDate DateTime?
contactEmail String?
about String?
discordLink String?
linkedinLink String?
twitterLink String?
githubLink String?
portfolioLink String?
}

model Company {
id String @id @default(cuid())
id String @id @default(cuid())
name String
logo String?
website String?
description String?
jobs Job[]
user User? @relation("UserCompany", fields: [userId], references: [id])
userId String? @unique
user User? @relation("UserCompany", fields: [userId], references: [id])
userId String? @unique
}

enum OauthProvider {
Expand Down Expand Up @@ -96,21 +106,21 @@ model Job {
postedAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
company Company @relation(fields: [companyId], references: [id], onDelete: Cascade)
bookmark Bookmark[]
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
company Company @relation(fields: [companyId], references: [id], onDelete: Cascade)
bookmark Bookmark[]
}

model Bookmark {
id String @id @default(uuid())
jobId String
userId String
job Job @relation(fields: [jobId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
id String @id @default(uuid())
jobId String
userId String
job Job @relation(fields: [jobId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}

model Experience {
id Int @id @default(autoincrement())
id Int @id @default(autoincrement())
companyName String
designation String
EmploymentType EmployementType
Expand All @@ -121,7 +131,18 @@ model Experience {
endDate DateTime?
description String
userId String
user User @relation(fields: [userId], references: [id])
user User @relation(fields: [userId], references: [id])
}

model Education {
id Int @id @default(autoincrement())
instituteName String
degree DegreeType
fieldOfStudy FieldOfStudyType
startDate DateTime
endDate DateTime?
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}

model Project {
Expand All @@ -134,6 +155,7 @@ model Project {
stack ProjectStack @default(OTHERS)
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
isFeature Boolean @default(false)
}

enum ProjectStack {
Expand Down Expand Up @@ -169,3 +191,17 @@ enum EmployementType {
Internship
Contract
}

enum DegreeType {
BTech
MTech
BCA
MCA
}

enum FieldOfStudyType {
AI
Machine_Learning
CS
Mechanical
}
6 changes: 6 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
User-agent: *
Allow: /
Disallow: /admin/*
Disallow: /manage/*

Sitemap: https://job.vineet.tech/sitemap.xml
6 changes: 6 additions & 0 deletions src/actions/job.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export const getAllJobs = withSession<
skills: true,
address: true,
workMode: true,
expired: true,
category: true,
minSalary: true,
maxSalary: true,
Expand Down Expand Up @@ -221,6 +222,7 @@ export const getRecommendedJobs = withServerActionAsyncCatcher<
maxSalary: true,
postedAt: true,
skills: true,
expired: true,
isVerifiedJob: true,
companyLogo: true,
},
Expand Down Expand Up @@ -254,6 +256,7 @@ export const getRecommendedJobs = withServerActionAsyncCatcher<
companyLogo: true,
minExperience: true,
maxExperience: true,
expired: true,
isVerifiedJob: true,
category: true,
},
Expand Down Expand Up @@ -296,6 +299,7 @@ export const getJobById = withServerActionAsyncCatcher<
minExperience: true,
maxExperience: true,
skills: true,
expired: true,
address: true,
workMode: true,
hasSalaryRange: true,
Expand Down Expand Up @@ -354,6 +358,7 @@ export const getRecentJobs = async () => {
minExperience: true,
maxExperience: true,
skills: true,
expired: true,
postedAt: true,
companyLogo: true,
type: true,
Expand Down Expand Up @@ -603,6 +608,7 @@ export async function GetBookmarkByUserId() {
minSalary: true,
maxSalary: true,
postedAt: true,
expired: true,
companyLogo: true,
},
},
Expand Down
Loading

0 comments on commit 79554b4

Please sign in to comment.