Skip to content

Commit

Permalink
Feat job seeker UI (#555)
Browse files Browse the repository at this point in the history
* added the forms ui

* refactor

* updated schema

* attached forms

* laoding skeleton responsivness

* added delete account

* added 404 page

* updated navbar

* all checked passed

* added socials

* social url optional

* added share button + edge cases

* fix error build

* fix conflicts and build
  • Loading branch information
devsharmagit authored Nov 1, 2024
1 parent 139175f commit a8d6364
Show file tree
Hide file tree
Showing 58 changed files with 4,529 additions and 398 deletions.
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;
40 changes: 40 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ model User {
blockedByAdmin DateTime?
onBoard Boolean @default(false)
bookmark Bookmark[]
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])
}
Expand Down Expand Up @@ -121,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 @@ -131,6 +156,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 @@ -166,3 +192,17 @@ enum EmployementType {
Internship
Contract
}

enum DegreeType {
BTech
MTech
BCA
MCA
}

enum FieldOfStudyType {
AI
Machine_Learning
CS
Mechanical
}
21 changes: 6 additions & 15 deletions prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ const users = [
{ id: '3', companyId: '1', name: 'Hr', email: '[email protected]', role: Role.HR, onBoard: true },
{ id: '4', companyId: '2', name: 'John', email: '[email protected]', role: Role.HR, onBoard: true },
{ id: '5', companyId: '3', name: 'Jane', email: '[email protected]', role: Role.HR, onBoard: true },


];


Expand Down Expand Up @@ -75,7 +73,6 @@ let jobs = [
minSalary: null,
maxSalary: null,
isVerifiedJob: false,

},
{
id: '3',
Expand All @@ -99,7 +96,7 @@ let jobs = [
minSalary: 90000,
maxSalary: 120000,
isVerifiedJob: true,
deleted: true
deleted: true,
},
{
id: '4',
Expand Down Expand Up @@ -148,7 +145,7 @@ let jobs = [
minSalary: 110000,
maxSalary: 150000,
isVerifiedJob: true,
deleted: true
deleted: true,
},
{
id: '6',
Expand All @@ -174,7 +171,6 @@ let jobs = [
minSalary: 80000,
maxSalary: 100000,
isVerifiedJob: false,

},
{
id: '7',
Expand All @@ -199,8 +195,7 @@ let jobs = [
minSalary: 70000,
maxSalary: 90000,
isVerifiedJob: false,
delted: true

delted: true,
},
{
id: '8',
Expand All @@ -225,8 +220,7 @@ let jobs = [
minSalary: null,
maxSalary: null,
isVerifiedJob: true,
deleted: true

deleted: true,
},
{
id: '9',
Expand All @@ -249,7 +243,6 @@ let jobs = [
minSalary: 100000,
maxSalary: 130000,
isVerifiedJob: true,

},
{
id: '10',
Expand All @@ -274,7 +267,6 @@ let jobs = [
minSalary: 75000,
maxSalary: 95000,
isVerifiedJob: false,

},
{
id: '11',
Expand All @@ -296,7 +288,6 @@ let jobs = [
minSalary: 25000,
maxSalary: 50000,
isVerifiedJob: true,

},
{
id: '12',
Expand All @@ -321,7 +312,7 @@ let jobs = [
minSalary: null,
maxSalary: null,
isVerifiedJob: true,
delted: false
delted: false,
},
];

Expand Down Expand Up @@ -441,4 +432,4 @@ async function main() {
await seedJobs();
}

main();
main();
Loading

0 comments on commit a8d6364

Please sign in to comment.