Skip to content

Commit

Permalink
Merge branch 'main' into feat/admin-add-hr
Browse files Browse the repository at this point in the history
  • Loading branch information
devsharmagit authored Nov 1, 2024
2 parents 03f941b + a8d6364 commit 65dabd8
Show file tree
Hide file tree
Showing 110 changed files with 5,233 additions and 563 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
66 changes: 66 additions & 0 deletions prisma/migrations/20241024174828_profileupdate/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
Warnings:
- A unique constraint covering the columns `[username]` on the table `User` will be added. If there are existing duplicate values, this will fail.
- Added the required column `aboutMe` to the `User` table without a default value. This is not possible if the table is not empty.
- Added the required column `contactEmail` to the `User` table without a default value. This is not possible if the table is not empty.
- Added the required column `username` to the `User` table without a default value. This is not possible if the table is not empty.
*/
-- CreateEnum
CREATE TYPE "ProjectStack" AS ENUM ('GO', 'PYTHON', 'MERN', 'NEXTJS', 'AI_GPT_APIS', 'SPRINGBOOT', 'OTHERS');

-- CreateEnum
CREATE TYPE "DegreeType" AS ENUM ('BTech', 'MTech', 'BCA', 'MCA');

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

-- DropForeignKey
ALTER TABLE "Experience" DROP CONSTRAINT "Experience_userId_fkey";

-- DropForeignKey
ALTER TABLE "Project" DROP CONSTRAINT "Project_userId_fkey";

-- AlterTable
ALTER TABLE "Job" ADD COLUMN "deletedAt" TIMESTAMP(3);

-- AlterTable
ALTER TABLE "Project" ADD COLUMN "isFeature" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "projectThumbnail" TEXT,
ADD COLUMN "stack" "ProjectStack" NOT NULL DEFAULT 'OTHERS';

-- AlterTable
ALTER TABLE "User" ADD COLUMN "aboutMe" TEXT NOT NULL,
ADD COLUMN "contactEmail" TEXT NOT NULL,
ADD COLUMN "discordLink" TEXT,
ADD COLUMN "githubLink" TEXT,
ADD COLUMN "linkedinLink" TEXT,
ADD COLUMN "portfolioLink" TEXT,
ADD COLUMN "twitterLink" TEXT,
ADD COLUMN "username" TEXT NOT NULL;

-- 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")
);

-- CreateIndex
CREATE UNIQUE INDEX "User_username_key" ON "User"("username");

-- AddForeignKey
ALTER TABLE "Experience" ADD CONSTRAINT "Experience_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Education" ADD CONSTRAINT "Education_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Project" ADD CONSTRAINT "Project_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
3 changes: 3 additions & 0 deletions prisma/migrations/20241025095014_user_updated/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "User" ALTER COLUMN "aboutMe" DROP NOT NULL,
ALTER COLUMN "contactEmail" DROP NOT NULL;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "resumeUpdateDate" TIMESTAMP(3);
11 changes: 11 additions & 0 deletions prisma/migrations/20241031043344_username_remove/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
Warnings:
- You are about to drop the column `username` on the `User` table. All the data in the column will be lost.
*/
-- DropIndex
DROP INDEX "User_username_key";

-- AlterTable
ALTER TABLE "User" DROP COLUMN "username";
26 changes: 26 additions & 0 deletions prisma/migrations/20241031064849_company/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
Warnings:
- A unique constraint covering the columns `[companyId]` on the table `User` will be added. If there are existing duplicate values, this will fail.
*/
-- AlterTable
ALTER TABLE "User" ADD COLUMN "companyId" TEXT,
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;

-- CreateTable
CREATE TABLE "Company" (
"id" TEXT NOT NULL,
"companyName" TEXT NOT NULL,
"companyLogo" TEXT,
"companyEmail" TEXT NOT NULL,
"companyBio" TEXT NOT NULL,

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

-- CreateIndex
CREATE UNIQUE INDEX "User_companyId_key" ON "User"("companyId");

-- AddForeignKey
ALTER TABLE "User" ADD CONSTRAINT "User_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "Company"("id") ON DELETE SET NULL ON UPDATE CASCADE;
61 changes: 55 additions & 6 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,37 @@ model User {
project Project[]
resume String?
oauthProvider OauthProvider? // Tracks OAuth provider (e.g., 'google')
oauthId String?
oauthProvider OauthProvider? // Tracks OAuth provider (e.g., 'google')
oauthId String?
createdAt DateTime @default(now())
blockedByAdmin DateTime?
onBoard Boolean @default(false)
onBoard Boolean @default(false)
bookmark Bookmark[]
companyId String? @unique
company Company? @relation(fields: [companyId], references: [id])
githubLink String?
portfolioLink String?
linkedinLink String?
twitterLink String?
discordLink String?
contactEmail String?
aboutMe String?
education Education[]
resumeUpdateDate DateTime?
companyId String? @unique
company Company? @relation(fields: [companyId], references: [id])
}

model Company {
id String @id @default(cuid())
companyName String
companyLogo String?
companyEmail String
companyBio String
user User?
}

enum OauthProvider {
Expand Down Expand Up @@ -112,6 +135,17 @@ model Experience {
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}

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 {
id Int @id @default(autoincrement())
projectName String
Expand All @@ -122,6 +156,7 @@ model Project {
stack ProjectStack @default(OTHERS)
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
isFeature Boolean @default(false)
}

model Company {
Expand Down Expand Up @@ -165,3 +200,17 @@ enum EmployementType {
Internship
Contract
}

enum DegreeType {
BTech
MTech
BCA
MCA
}

enum FieldOfStudyType {
AI
Machine_Learning
CS
Mechanical
}
Loading

0 comments on commit 65dabd8

Please sign in to comment.