From 99220fb9a9f80bf8a5c8054f753c783cdadaa459 Mon Sep 17 00:00:00 2001 From: Om Lanke Date: Sun, 29 Jun 2025 13:05:12 +0530 Subject: [PATCH] few changes --- apps/admin/app/page.tsx | 8 +- apps/admin/app/signup/page.tsx | 2 +- apps/admin/components/login.tsx | 28 +- apps/admin/next.config.mjs | 2 +- packages/db/index.ts | 2 +- .../0004_blushing_captain_flint.sql | 5 + packages/db/migrations/0005_solid_photon.sql | 3 + .../db/migrations/meta/0004_snapshot.json | 751 +++++++++++++++++ .../db/migrations/meta/0005_snapshot.json | 769 ++++++++++++++++++ packages/db/migrations/meta/_journal.json | 14 + packages/db/schema.ts | 140 ++-- packages/db/tsconfig.json | 12 - packages/ui/Archive.zip | Bin 19771 -> 0 bytes packages/ui/src/components/button.tsx | 68 +- packages/ui/src/components/card.tsx | 2 +- packages/ui/src/components/input.tsx | 2 +- packages/ui/src/components/progress.tsx | 2 +- packages/ui/src/components/separator.tsx | 2 +- packages/ui/src/components/textarea.tsx | 2 +- packages/ui/src/styles/globals.css | 126 +-- 20 files changed, 1743 insertions(+), 197 deletions(-) create mode 100644 packages/db/migrations/0004_blushing_captain_flint.sql create mode 100644 packages/db/migrations/0005_solid_photon.sql create mode 100644 packages/db/migrations/meta/0004_snapshot.json create mode 100644 packages/db/migrations/meta/0005_snapshot.json delete mode 100644 packages/ui/Archive.zip diff --git a/apps/admin/app/page.tsx b/apps/admin/app/page.tsx index 55f3a22..5855ba0 100644 --- a/apps/admin/app/page.tsx +++ b/apps/admin/app/page.tsx @@ -20,12 +20,14 @@ async function logOut() { } export default async function Page() { - const session = await auth() + const session = await auth(); return (
-

Hello admin {session?.user?.name}

- {!session?.user && } +

+ Hello admin {session?.user?.name} +

+ {!session?.user && }
diff --git a/apps/admin/app/signup/page.tsx b/apps/admin/app/signup/page.tsx index abfda4a..8136ee4 100644 --- a/apps/admin/app/signup/page.tsx +++ b/apps/admin/app/signup/page.tsx @@ -141,7 +141,7 @@ export default function StudentRegistrationForm() { const progress = (currentStep / steps.length) * 100 return ( -
+
diff --git a/apps/admin/components/login.tsx b/apps/admin/components/login.tsx index 7b42ac7..58c5d59 100644 --- a/apps/admin/components/login.tsx +++ b/apps/admin/components/login.tsx @@ -2,23 +2,19 @@ import { signIn } from "@workspace/auth"; import { Button } from "@workspace/ui/components/button"; -export default function Login({logIn}: {logIn: () => Promise}) { +export default function Login({ action }: { action: () => Promise }) { return ( -
-
); diff --git a/apps/admin/next.config.mjs b/apps/admin/next.config.mjs index 9f01025..58e988e 100644 --- a/apps/admin/next.config.mjs +++ b/apps/admin/next.config.mjs @@ -1,6 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - transpilePackages: ["@workspace/ui"], + transpilePackages: ["@workspace/ui", "@workspace/db", "@workspace/auth"], }; export default nextConfig; diff --git a/packages/db/index.ts b/packages/db/index.ts index 535414c..3cf6d41 100644 --- a/packages/db/index.ts +++ b/packages/db/index.ts @@ -2,4 +2,4 @@ import { drizzle } from "drizzle-orm/neon-http"; export const db = drizzle(process.env.DATABASE_URL!); -export * from "./schema.ts"; +export * from "./schema"; diff --git a/packages/db/migrations/0004_blushing_captain_flint.sql b/packages/db/migrations/0004_blushing_captain_flint.sql new file mode 100644 index 0000000..f65431a --- /dev/null +++ b/packages/db/migrations/0004_blushing_captain_flint.sql @@ -0,0 +1,5 @@ +DROP TABLE "certificates" CASCADE;--> statement-breakpoint +DROP TABLE "projects" CASCADE;--> statement-breakpoint +ALTER TABLE "students" ADD COLUMN "isDiploma" boolean;--> statement-breakpoint +ALTER TABLE "companies" DROP COLUMN "passwordHash";--> statement-breakpoint +ALTER TABLE "internships" DROP COLUMN "status"; \ No newline at end of file diff --git a/packages/db/migrations/0005_solid_photon.sql b/packages/db/migrations/0005_solid_photon.sql new file mode 100644 index 0000000..de99f25 --- /dev/null +++ b/packages/db/migrations/0005_solid_photon.sql @@ -0,0 +1,3 @@ +ALTER TABLE "students" ADD COLUMN "gender" varchar(10);--> statement-breakpoint +ALTER TABLE "students" ADD COLUMN "dob" timestamp;--> statement-breakpoint +ALTER TABLE "students" ADD COLUMN "personalGmail" text; \ No newline at end of file diff --git a/packages/db/migrations/meta/0004_snapshot.json b/packages/db/migrations/meta/0004_snapshot.json new file mode 100644 index 0000000..c9107a2 --- /dev/null +++ b/packages/db/migrations/meta/0004_snapshot.json @@ -0,0 +1,751 @@ +{ + "id": "5bcc500e-17e0-411d-8b8c-597d5b6de14d", + "prevId": "a00a32a1-83c4-49c8-b7b5-ff990facf461", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.admins": { + "name": "admins", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "admins_email_unique": { + "name": "admins_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.applications": { + "name": "applications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "job_id": { + "name": "job_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "student_id": { + "name": "student_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "resume_id": { + "name": "resume_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "applications_job_id_jobs_id_fk": { + "name": "applications_job_id_jobs_id_fk", + "tableFrom": "applications", + "tableTo": "jobs", + "columnsFrom": [ + "job_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "applications_student_id_students_id_fk": { + "name": "applications_student_id_students_id_fk", + "tableFrom": "applications", + "tableTo": "students", + "columnsFrom": [ + "student_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "applications_resume_id_resumes_id_fk": { + "name": "applications_resume_id_resumes_id_fk", + "tableFrom": "applications", + "tableTo": "resumes", + "columnsFrom": [ + "resume_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "link": { + "name": "link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "imageURL": { + "name": "imageURL", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.grades": { + "name": "grades", + "schema": "", + "columns": { + "student_id": { + "name": "student_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "sem": { + "name": "sem", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "sgpi": { + "name": "sgpi", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": true + }, + "isKT": { + "name": "isKT", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "deadKT": { + "name": "deadKT", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "grades_student_id_students_id_fk": { + "name": "grades_student_id_students_id_fk", + "tableFrom": "grades", + "tableTo": "students", + "columnsFrom": [ + "student_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "grades_student_id_sem_pk": { + "name": "grades_student_id_sem_pk", + "columns": [ + "student_id", + "sem" + ] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "sem_check1": { + "name": "sem_check1", + "value": "\"grades\".\"sem\" < 9" + } + }, + "isRLSEnabled": false + }, + "public.internships": { + "name": "internships", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "student_id": { + "name": "student_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "company": { + "name": "company", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "startDate": { + "name": "startDate", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "endDate": { + "name": "endDate", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "internships_student_id_students_id_fk": { + "name": "internships_student_id_students_id_fk", + "tableFrom": "internships", + "tableTo": "students", + "columnsFrom": [ + "student_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.jobs": { + "name": "jobs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "company_id": { + "name": "company_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "link": { + "name": "link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "imageURL": { + "name": "imageURL", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "salary": { + "name": "salary", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applicationDeadline": { + "name": "applicationDeadline", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "minCGPA": { + "name": "minCGPA", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "minSSC": { + "name": "minSSC", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "minHSC": { + "name": "minHSC", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "allowDeadKT": { + "name": "allowDeadKT", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "allowLiveKT": { + "name": "allowLiveKT", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "jobs_company_id_companies_id_fk": { + "name": "jobs_company_id_companies_id_fk", + "tableFrom": "jobs", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resumes": { + "name": "resumes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "student_id": { + "name": "student_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "link": { + "name": "link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "resumes_student_id_students_id_fk": { + "name": "resumes_student_id_students_id_fk", + "tableFrom": "resumes", + "tableTo": "students", + "columnsFrom": [ + "student_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.students": { + "name": "students", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "rollNumber": { + "name": "rollNumber", + "type": "varchar(12)", + "primaryKey": false, + "notNull": false + }, + "verified": { + "name": "verified", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "firstName": { + "name": "firstName", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "middleName": { + "name": "middleName", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "lastName": { + "name": "lastName", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "mothersName": { + "name": "mothersName", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "phoneNumber": { + "name": "phoneNumber", + "type": "varchar(10)", + "primaryKey": false, + "notNull": false + }, + "address": { + "name": "address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "profilePicture": { + "name": "profilePicture", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "degree": { + "name": "degree", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "branch": { + "name": "branch", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "year": { + "name": "year", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "skills": { + "name": "skills", + "type": "text[]", + "primaryKey": false, + "notNull": false, + "default": "ARRAY[]::text[]" + }, + "linkedin": { + "name": "linkedin", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "github": { + "name": "github", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ssc": { + "name": "ssc", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": false + }, + "hsc": { + "name": "hsc", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": false + }, + "isDiploma": { + "name": "isDiploma", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/packages/db/migrations/meta/0005_snapshot.json b/packages/db/migrations/meta/0005_snapshot.json new file mode 100644 index 0000000..b9eff47 --- /dev/null +++ b/packages/db/migrations/meta/0005_snapshot.json @@ -0,0 +1,769 @@ +{ + "id": "1506d00a-2620-44ac-af01-19e04c21f679", + "prevId": "5bcc500e-17e0-411d-8b8c-597d5b6de14d", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.admins": { + "name": "admins", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "admins_email_unique": { + "name": "admins_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.applications": { + "name": "applications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "job_id": { + "name": "job_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "student_id": { + "name": "student_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "resume_id": { + "name": "resume_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "applications_job_id_jobs_id_fk": { + "name": "applications_job_id_jobs_id_fk", + "tableFrom": "applications", + "tableTo": "jobs", + "columnsFrom": [ + "job_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "applications_student_id_students_id_fk": { + "name": "applications_student_id_students_id_fk", + "tableFrom": "applications", + "tableTo": "students", + "columnsFrom": [ + "student_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "applications_resume_id_resumes_id_fk": { + "name": "applications_resume_id_resumes_id_fk", + "tableFrom": "applications", + "tableTo": "resumes", + "columnsFrom": [ + "resume_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.companies": { + "name": "companies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "link": { + "name": "link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "imageURL": { + "name": "imageURL", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.grades": { + "name": "grades", + "schema": "", + "columns": { + "student_id": { + "name": "student_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "sem": { + "name": "sem", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "sgpi": { + "name": "sgpi", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": true + }, + "isKT": { + "name": "isKT", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "deadKT": { + "name": "deadKT", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "grades_student_id_students_id_fk": { + "name": "grades_student_id_students_id_fk", + "tableFrom": "grades", + "tableTo": "students", + "columnsFrom": [ + "student_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "grades_student_id_sem_pk": { + "name": "grades_student_id_sem_pk", + "columns": [ + "student_id", + "sem" + ] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "sem_check1": { + "name": "sem_check1", + "value": "\"grades\".\"sem\" < 9" + } + }, + "isRLSEnabled": false + }, + "public.internships": { + "name": "internships", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "student_id": { + "name": "student_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "company": { + "name": "company", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "startDate": { + "name": "startDate", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "endDate": { + "name": "endDate", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "internships_student_id_students_id_fk": { + "name": "internships_student_id_students_id_fk", + "tableFrom": "internships", + "tableTo": "students", + "columnsFrom": [ + "student_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.jobs": { + "name": "jobs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "company_id": { + "name": "company_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "link": { + "name": "link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "imageURL": { + "name": "imageURL", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "salary": { + "name": "salary", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applicationDeadline": { + "name": "applicationDeadline", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "minCGPA": { + "name": "minCGPA", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "minSSC": { + "name": "minSSC", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "minHSC": { + "name": "minHSC", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "allowDeadKT": { + "name": "allowDeadKT", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "allowLiveKT": { + "name": "allowLiveKT", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "jobs_company_id_companies_id_fk": { + "name": "jobs_company_id_companies_id_fk", + "tableFrom": "jobs", + "tableTo": "companies", + "columnsFrom": [ + "company_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resumes": { + "name": "resumes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "student_id": { + "name": "student_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "link": { + "name": "link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "resumes_student_id_students_id_fk": { + "name": "resumes_student_id_students_id_fk", + "tableFrom": "resumes", + "tableTo": "students", + "columnsFrom": [ + "student_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.students": { + "name": "students", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "rollNumber": { + "name": "rollNumber", + "type": "varchar(12)", + "primaryKey": false, + "notNull": false + }, + "verified": { + "name": "verified", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "firstName": { + "name": "firstName", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "middleName": { + "name": "middleName", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "lastName": { + "name": "lastName", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "mothersName": { + "name": "mothersName", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "gender": { + "name": "gender", + "type": "varchar(10)", + "primaryKey": false, + "notNull": false + }, + "dob": { + "name": "dob", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "personalGmail": { + "name": "personalGmail", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "phoneNumber": { + "name": "phoneNumber", + "type": "varchar(10)", + "primaryKey": false, + "notNull": false + }, + "address": { + "name": "address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "profilePicture": { + "name": "profilePicture", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "degree": { + "name": "degree", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "branch": { + "name": "branch", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "year": { + "name": "year", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "skills": { + "name": "skills", + "type": "text[]", + "primaryKey": false, + "notNull": false, + "default": "ARRAY[]::text[]" + }, + "linkedin": { + "name": "linkedin", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "github": { + "name": "github", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ssc": { + "name": "ssc", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": false + }, + "hsc": { + "name": "hsc", + "type": "numeric(4, 2)", + "primaryKey": false, + "notNull": false + }, + "isDiploma": { + "name": "isDiploma", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index 272148e..1f2c754 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -29,6 +29,20 @@ "when": 1750849519081, "tag": "0003_clammy_shadowcat", "breakpoints": true + }, + { + "idx": 4, + "version": "7", + "when": 1751094285471, + "tag": "0004_blushing_captain_flint", + "breakpoints": true + }, + { + "idx": 5, + "version": "7", + "when": 1751182452704, + "tag": "0005_solid_photon", + "breakpoints": true } ] } \ No newline at end of file diff --git a/packages/db/schema.ts b/packages/db/schema.ts index 74beb28..b770cd1 100644 --- a/packages/db/schema.ts +++ b/packages/db/schema.ts @@ -9,7 +9,7 @@ import { integer, numeric, primaryKey, - check + check, } from "drizzle-orm/pg-core"; export const students = pgTable("students", { @@ -21,6 +21,9 @@ export const students = pgTable("students", { middleName: varchar({ length: 255 }), lastName: varchar({ length: 255 }), mothersName: varchar({ length: 255 }), + gender: varchar({ length: 10 }), + dob: timestamp(), + personalGmail: text(), phoneNumber: varchar({ length: 10 }), address: text(), profilePicture: text(), @@ -32,9 +35,9 @@ export const students = pgTable("students", { .default(sql`ARRAY[]::text[]`), linkedin: text(), github: text(), - ssc: numeric({ precision: 4, scale: 2 }), - hsc: numeric({ precision: 4, scale: 2 }), - isDiploma: boolean(), + ssc: numeric({ precision: 4, scale: 2 }), // TODO: year, board + hsc: numeric({ precision: 4, scale: 2 }), // TODO: year, board + isDiploma: boolean(), // TODO: diploma branch createdAt: timestamp().notNull().defaultNow(), updatedAt: timestamp() .defaultNow() @@ -53,7 +56,7 @@ export const internships = pgTable("internships", { location: text().notNull(), startDate: timestamp().notNull(), endDate: timestamp().notNull(), - status: text().notNull(), + // status: text().notNull(), createdAt: timestamp().notNull().defaultNow(), updatedAt: timestamp() .defaultNow() @@ -61,38 +64,38 @@ export const internships = pgTable("internships", { .notNull(), }); -export const projects = pgTable("projects", { - id: serial().primaryKey(), - studentId: integer("student_id") - .notNull() - .references(() => students.id), - title: text().notNull(), - description: text().notNull(), - links: text() - .array() - .notNull() - .default(sql`ARRAY[]::text[]`), - createdAt: timestamp().notNull().defaultNow(), - updatedAt: timestamp() - .defaultNow() - .$onUpdate(() => new Date()) - .notNull(), -}); +// export const projects = pgTable("projects", { +// id: serial().primaryKey(), +// studentId: integer("student_id") +// .notNull() +// .references(() => students.id), +// title: text().notNull(), +// description: text().notNull(), +// links: text() +// .array() +// .notNull() +// .default(sql`ARRAY[]::text[]`), +// createdAt: timestamp().notNull().defaultNow(), +// updatedAt: timestamp() +// .defaultNow() +// .$onUpdate(() => new Date()) +// .notNull(), +// }); -export const certificates = pgTable("certificates", { - id: serial().primaryKey(), - studentId: integer("student_id") - .notNull() - .references(() => students.id), - title: text().notNull(), - description: text().notNull(), - link: text().notNull(), - createdAt: timestamp().notNull().defaultNow(), - updatedAt: timestamp() - .defaultNow() - .$onUpdate(() => new Date()) - .notNull(), -}); +// export const certificates = pgTable("certificates", { +// id: serial().primaryKey(), +// studentId: integer("student_id") +// .notNull() +// .references(() => students.id), +// title: text().notNull(), +// description: text().notNull(), +// link: text().notNull(), +// createdAt: timestamp().notNull().defaultNow(), +// updatedAt: timestamp() +// .defaultNow() +// .$onUpdate(() => new Date()) +// .notNull(), +// }); export const resumes = pgTable("resumes", { id: serial().primaryKey(), @@ -108,25 +111,32 @@ export const resumes = pgTable("resumes", { .notNull(), }); -export const grades = pgTable("grades", { - studentId: integer("student_id") - .notNull() - .references(() => students.id), - sem: integer().notNull(), - sgpi: numeric({ precision: 4, scale: 2 }).notNull(), - isKT: boolean().notNull(), - deadKT: boolean(), - createdAt: timestamp().notNull().defaultNow(), - updatedAt: timestamp() - .defaultNow() - .$onUpdate(() => new Date()) - .notNull(), -}, (table) => [primaryKey({ columns: [table.studentId, table.sem] }), check("sem_check1", sql`${table.sem} < 9`)]); +export const grades = pgTable( + "grades", + { + studentId: integer("student_id") + .notNull() + .references(() => students.id), + sem: integer().notNull(), + sgpi: numeric({ precision: 4, scale: 2 }).notNull(), + isKT: boolean().notNull(), + deadKT: boolean(), + createdAt: timestamp().notNull().defaultNow(), + updatedAt: timestamp() + .defaultNow() + .$onUpdate(() => new Date()) + .notNull(), + }, + (table) => [ + primaryKey({ columns: [table.studentId, table.sem] }), + check("sem_check1", sql`${table.sem} < 9`), + ], +); export const studentRelations = relations(students, ({ many }) => ({ internships: many(internships), - projects: many(projects), - certificates: many(certificates), + // projects: many(projects), + // certificates: many(certificates), resumes: many(resumes), grades: many(grades), })); @@ -138,19 +148,19 @@ export const internshipRelations = relations(internships, ({ one }) => ({ }), })); -export const projectRelations = relations(projects, ({ one }) => ({ - student: one(students, { - fields: [projects.studentId], - references: [students.id], - }), -})); +// export const projectRelations = relations(projects, ({ one }) => ({ +// student: one(students, { +// fields: [projects.studentId], +// references: [students.id], +// }), +// })); -export const certificateRelations = relations(certificates, ({ one }) => ({ - student: one(students, { - fields: [certificates.studentId], - references: [students.id], - }), -})); +// export const certificateRelations = relations(certificates, ({ one }) => ({ +// student: one(students, { +// fields: [certificates.studentId], +// references: [students.id], +// }), +// })); export const resumeRelations = relations(resumes, ({ one, many }) => ({ student: one(students, { @@ -173,7 +183,7 @@ export const companies = pgTable("companies", { email: text().notNull(), link: text().notNull(), description: text().notNull(), - passwordHash: text(), + // passwordHash: text(), imageURL: text().notNull(), createdAt: timestamp().notNull().defaultNow(), updatedAt: timestamp() diff --git a/packages/db/tsconfig.json b/packages/db/tsconfig.json index 303f19e..e69de29 100644 --- a/packages/db/tsconfig.json +++ b/packages/db/tsconfig.json @@ -1,12 +0,0 @@ -{ - "extends": "@workspace/typescript-config/nextjs.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@/*": ["./*"], - }, - "allowImportingTsExtensions": true, - }, - "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] -} diff --git a/packages/ui/Archive.zip b/packages/ui/Archive.zip deleted file mode 100644 index a41e319fa41cce8190c108f8ef175980c47d6840..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19771 zcmd6O1yq&U_x43Plx{>oy1S9?ke2T5ZjeUl?(PN&krD#|ML<$O=|&I*X^`*U8E3p8 zAoHzR|M}s1ebwc9_I}Q;^X{{cyfh>f1_1OUYS*vv#~*(D1_dAjI64?IIJ+SNAfUD( z0DwRKql)r%04xHff?1~BpO5?>2yg(nUl48p5p;EB1%>Y_sWH&&0>LiB@?F$4Gt|R0 zG}SZE`ywl&`UP3_fxPdvXdFli6nqGKVw8ZrFx&^%B8iCw<;f*Fk%$(>lwLeQ!Itgq z80TFzL{$bi$!ARt54A&LbcFAWP<9}%sr3S^cCeE!rJM3Yiu z>=b9jADkVX+^viq&!ui0p=tKl^OO2nAWU%Tpj8CY{{!>975EG8zgPjg@Y5@R{9^?S zZLRHWZH#T4&R>P=Kx6&&{9J{zV7R}o!cW}uR^l(n|6(Q1`ai;tl`yllwLE_jt`-Ft zzb?WbkmvFL3-Nz}Kim)gR^|rh2Et#ug7Uym7dX3$Xuq-t0{$;?2W2iZkJC|r^@ID5 zJYZ^NYoKrCNN?!qc%J429hzp@otkE#cYUI^V=f~`@WwGFE`!UEHp;bPXWJth)X_vL z6!Lb}qPhE10{*dfd#h``by5zQTZ=E_IMQRwv%~YqC?pS3<`vWuyQjjGBpGPK`v)F3 zY(`;-HcnVQ#y<>8YIAdM4N#K^(ji>(!eKWI8#E-$!g?JS{$(^)Nj-f}GyT=FrC+r1 zaSm65RBV!X-4T)1@TxlEo}ZBjQbHkifTz>FFWP1yNwI@((IkW%B1v9M_OEs_QQdPn zZc(p#g%KI9SZQKMK66Num&D6Wa*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pPpj?l^=ZHE csvg]:px-5", - sm: "h-9 rounded-lg gap-1.5 px-4 has-[>svg]:px-3 text-xs font-medium", - lg: "h-13 rounded-xl px-8 has-[>svg]:px-6 text-base", - icon: "size-11 rounded-xl", + default: "h-10 px-4 py-2", + sm: "h-8 rounded-md px-3 text-xs", + lg: "h-12 rounded-lg px-6 text-base", + icon: "h-10 w-10", }, }, defaultVariants: { @@ -32,21 +35,26 @@ const buttonVariants = cva( size: "default", }, }, -) +); -function Button({ - className, - variant, - size, - asChild = false, - ...props -}: React.ComponentProps<"button"> & - VariantProps & { - asChild?: boolean - }) { - const Comp = asChild ? Slot : "button" - - return +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean; } -export { Button, buttonVariants } +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button"; + return ( + + ); + }, +); +Button.displayName = "Button"; + +export { Button, buttonVariants }; diff --git a/packages/ui/src/components/card.tsx b/packages/ui/src/components/card.tsx index 48d9bc4..b0d1d94 100644 --- a/packages/ui/src/components/card.tsx +++ b/packages/ui/src/components/card.tsx @@ -7,7 +7,7 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
) { type={type} data-slot="input" className={cn( - "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-12 w-full min-w-0 rounded-xl border-2 bg-transparent px-4 py-3 text-base shadow-md shadow-black/5 transition-all duration-200 outline-none file:inline-flex file:h-8 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm backdrop-blur-sm", + "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-12 w-full min-w-0 rounded-md border-2 bg-transparent px-4 py-3 text-base shadow-md shadow-black/5 transition-all duration-200 outline-none file:inline-flex file:h-8 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm backdrop-blur-sm", "focus-visible:border-primary focus-visible:ring-primary/20 focus-visible:ring-4 focus-visible:shadow-lg focus-visible:shadow-primary/10", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", "hover:border-border/80 hover:shadow-lg", diff --git a/packages/ui/src/components/progress.tsx b/packages/ui/src/components/progress.tsx index 2d37d8d..f2ff8b8 100644 --- a/packages/ui/src/components/progress.tsx +++ b/packages/ui/src/components/progress.tsx @@ -17,7 +17,7 @@ function Progress({ className, value, ...props }: React.ComponentProps diff --git a/packages/ui/src/components/separator.tsx b/packages/ui/src/components/separator.tsx index 74b1b5f..a2a50e5 100644 --- a/packages/ui/src/components/separator.tsx +++ b/packages/ui/src/components/separator.tsx @@ -17,7 +17,7 @@ function Separator({ decorative={decorative} orientation={orientation} className={cn( - "bg-gradient-to-r from-transparent via-border to-transparent shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px data-[orientation=vertical]:bg-gradient-to-b", + "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px data-[orientation=vertical]:bg-gradient-to-b", className, )} {...props} diff --git a/packages/ui/src/components/textarea.tsx b/packages/ui/src/components/textarea.tsx index 3535356..079c23d 100644 --- a/packages/ui/src/components/textarea.tsx +++ b/packages/ui/src/components/textarea.tsx @@ -7,7 +7,7 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {