Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

add warning for missing .env variable

Khuram Niaz97f947bc6e35
diff --git a/README.md b/README.md
index 2b6f1af..3aa0377 100644
--- a/README.md
+++ b/README.md
@@ -47,8 +47,8 @@ JobSync Assistant is completely free to use and open source. It provides a power
git clone https://github.com/Gsync/jobsync.git
```
-#### Step 2 (Optional) - Change environment variables
-* **Refer to .env.example and change to .env with your environment variables**
+#### Step 2 - Change environment variables
+* ** You must create a .env file before proceeding. Refer to .env.example and create or change to .env with your environment variables**
#### 2.1 Generate auth secret (Optional)
diff --git a/docker-compose.yml b/docker-compose.yml
index 1f26ebb..d13652d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -4,7 +4,6 @@ services:
build:
context: .
dockerfile: Dockerfile
- image: jobsync_app_image
ports:
- "3000:3000"
environment:
diff --git a/prisma/seed.js b/prisma/seed.js
index 8ef35d7..807bea3 100644
--- a/prisma/seed.js
+++ b/prisma/seed.js
@@ -7,8 +7,14 @@ const prisma = new PrismaClient();
async function seedUser() {
try {
- const password = await bcrypt.hash(process.env.USER_PASSWORD, 10);
const email = process.env.USER_EMAIL;
+ if (!email || email.trim() === "") {
+ console.warn(
+ "\x1b[33m[WARNING] USER_EMAIL environment variable is blank or not set. Please set USER_EMAIL in your .env file. Seeding will continue, but user will not be created.\x1b[0m"
+ );
+ return;
+ }
+ const password = await bcrypt.hash(process.env.USER_PASSWORD, 10);
// Check if the user already exists
const existingUser = await prisma.user.findUnique({
where: {