Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ WEBHOOK_SECRET="your-webhook-secret-change-in-production"
# Log level: 'debug' | 'info' | 'warn' | 'error'
LOG_LEVEL=info

# ------------------------------------------
# Sentry Error Reporting (optional)
# ------------------------------------------
# SENTRY_DSN="https://examplePublicKey@o0.ingest.sentry.io/0"
# SENTRY_RELEASE="web3-student-lab@1.0.0"

# ------------------------------------------
# CORS Configuration (optional)
# ------------------------------------------
Expand Down
214 changes: 214 additions & 0 deletions backend/logs/combined.log

Large diffs are not rendered by default.

154 changes: 154 additions & 0 deletions backend/logs/error.log
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,160 @@ Unique constraint failed on the fields: (`tokenId`)
at Object.<anonymous> (/home/knights/Documents/Drips Miantainer Project/Web3-Student-Lab/backend/tests/certificates.test.ts:487:18)
2026-05-20 09:55:55 error: Mint certificate error: Student with ID non-existent-student not found
2026-05-20 09:55:55 error: Mint certificate error: Course with ID non-existent-course not found
2026-05-31 05:35:41 error: Error: Stream isn't writeable and enableOfflineQueue options is false
at EventEmitter.sendCommand (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/ioredis@5.11.0/node_modules/ioredis/built/Redis.js:376:32)
at EventEmitter.ping (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/ioredis@5.11.0/node_modules/ioredis/built/utils/Commander.js:90:25)
at RedisClient.ping (/workspaces/Web3-Student-Lab/backend/src/cache/RedisClient.ts:90:40)
at RedisClient.connect (/workspaces/Web3-Student-Lab/backend/src/cache/RedisClient.ts:79:18)
at Object.<anonymous> (/workspaces/Web3-Student-Lab/backend/tests/cache-distributed.test.ts:11:23)
at Promise.then.completed (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusHook (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:281:40)
at _runTestsForDescribeBlock (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:95:7)
at _runTestsForDescribeBlock (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:121:9)
at run (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:71:3)
at runAndTransformResultsToJestFormat (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
at jestAdapter (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
at runTestInternal (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-runner@29.7.0/node_modules/jest-runner/build/runTest.js:367:16)
at runTest (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-runner@29.7.0/node_modules/jest-runner/build/runTest.js:444:34)
2026-05-31 05:35:41 error: AggregateError:
at internalConnectMultiple (node:net:1142:49)
at afterConnectMultiple (node:net:1723:7)
2026-05-31 05:35:42 error: ❌ Environment Configuration Error: Environment validation failed:

Missing required environment variable: DATABASE_URL
Description: PostgreSQL connection string for database connectivity
Please check your .env file and .env.example for guidance.

Missing required environment variable: REDIS_URL
Description: Redis connection URL for background jobs and WebSockets
Please check your .env file and .env.example for guidance.

Please copy .env.example to .env and fill in the required values.
2026-05-31 05:35:42 error: ❌ Environment Configuration Error: Environment validation failed:

Missing required environment variable: JWT_SECRET
Description: Secret key for JWT token signing and verification
Please check your .env file and .env.example for guidance.

Missing required environment variable: REDIS_URL
Description: Redis connection URL for background jobs and WebSockets
Please check your .env file and .env.example for guidance.

Please copy .env.example to .env and fill in the required values.
2026-05-31 05:35:42 error: ❌ Environment Configuration Error: Environment validation failed:

Invalid value for environment variable: JWT_SECRET
Description: Secret key for JWT token signing and verification
Current value: "short"
Please check .env.example for the correct format.

Missing required environment variable: REDIS_URL
Description: Redis connection URL for background jobs and WebSockets
Please check your .env file and .env.example for guidance.

Please copy .env.example to .env and fill in the required values.
2026-05-31 05:35:42 error: ❌ Environment Configuration Error: Environment validation failed:

Invalid value for environment variable: JWT_SECRET
Description: Secret key for JWT token signing and verification
Current value: "short"
Please check .env.example for the correct format.

Missing required environment variable: REDIS_URL
Description: Redis connection URL for background jobs and WebSockets
Please check your .env file and .env.example for guidance.

Please copy .env.example to .env and fill in the required values.
2026-05-31 05:35:42 error: ❌ Environment Configuration Error: Environment validation failed:

Invalid value for environment variable: JWT_SECRET
Description: Secret key for JWT token signing and verification
Current value: "your-secret-key-change-in-production"
Please check .env.example for the correct format.

Missing required environment variable: REDIS_URL
Description: Redis connection URL for background jobs and WebSockets
Please check your .env file and .env.example for guidance.

Please copy .env.example to .env and fill in the required values.
2026-05-31 05:35:42 error: ❌ Environment Configuration Error: Environment validation failed:

Invalid value for environment variable: JWT_SECRET
Description: Secret key for JWT token signing and verification
Current value: "your-secret-key-change-in-production"
Please check .env.example for the correct format.

Missing required environment variable: REDIS_URL
Description: Redis connection URL for background jobs and WebSockets
Please check your .env file and .env.example for guidance.

Please copy .env.example to .env and fill in the required values.
2026-05-31 05:35:42 error: ❌ Environment Configuration Error: Environment validation failed:

Invalid value for environment variable: DATABASE_URL
Description: PostgreSQL connection string for database connectivity
Current value: "invalid-url-format"
Please check .env.example for the correct format.

Missing required environment variable: REDIS_URL
Description: Redis connection URL for background jobs and WebSockets
Please check your .env file and .env.example for guidance.

Please copy .env.example to .env and fill in the required values.
2026-05-31 05:35:42 error: ❌ Environment Configuration Error: Environment validation failed:

Invalid value for environment variable: DATABASE_URL
Description: PostgreSQL connection string for database connectivity
Current value: "invalid-url-format"
Please check .env.example for the correct format.

Missing required environment variable: REDIS_URL
Description: Redis connection URL for background jobs and WebSockets
Please check your .env file and .env.example for guidance.

Please copy .env.example to .env and fill in the required values.
2026-05-31 05:35:42 error: ❌ Environment Configuration Error: Environment validation failed:

Missing required environment variable: STELLAR_ISSUER_SECRET_KEY
Description: Stellar secret key for certificate issuance (production only)
Please check your .env file and .env.example for guidance.

Missing required environment variable: STELLAR_ISSUER_PUBLIC_KEY
Description: Stellar public key for certificate issuance (production only)
Please check your .env file and .env.example for guidance.

Please copy .env.example to .env and fill in the required values.
2026-05-31 05:35:42 error: ❌ Environment Configuration Error: Environment validation failed:

Missing required environment variable: STELLAR_ISSUER_SECRET_KEY
Description: Stellar secret key for certificate issuance (production only)
Please check your .env file and .env.example for guidance.

Missing required environment variable: STELLAR_ISSUER_PUBLIC_KEY
Description: Stellar public key for certificate issuance (production only)
Please check your .env file and .env.example for guidance.

Please copy .env.example to .env and fill in the required values.
2026-05-31 05:35:42 error: DB health check failed
2026-05-31 05:35:43 error: Error: Stream isn't writeable and enableOfflineQueue options is false
at EventEmitter.sendCommand (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/ioredis@5.11.0/node_modules/ioredis/built/Redis.js:376:32)
at EventEmitter.ping (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/ioredis@5.11.0/node_modules/ioredis/built/utils/Commander.js:90:25)
at RedisClient.ping (/workspaces/Web3-Student-Lab/backend/src/cache/RedisClient.ts:90:40)
at RedisClient.connect (/workspaces/Web3-Student-Lab/backend/src/cache/RedisClient.ts:79:18)
at Object.<anonymous> (/workspaces/Web3-Student-Lab/backend/tests/cache.test.ts:7:23)
at Promise.then.completed (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusHook (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:281:40)
at _runTestsForDescribeBlock (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:95:7)
at _runTestsForDescribeBlock (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:121:9)
at run (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/run.js:71:3)
at runAndTransformResultsToJestFormat (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
at jestAdapter (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-circus@29.7.0/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
at runTestInternal (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-runner@29.7.0/node_modules/jest-runner/build/runTest.js:367:16)
at runTest (/workspaces/Web3-Student-Lab/backend/node_modules/.pnpm/jest-runner@29.7.0/node_modules/jest-runner/build/runTest.js:444:34)
2026-05-31 11:33:24 error: PrismaClientKnownRequestError:
Invalid `prisma.auditLog.create()` invocation in
/home/edohwares/Desktop/Room/drips/kingadams/Web3-Student-Lab/backend/src/utils/audit.ts:44:27
Expand Down
10 changes: 10 additions & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"start": "node dist/src/index.js",
"start:prod": "node dist/src/index.js",
"dev": "tsx watch src/index.ts",
"test": "jest --runInBand",
"collaboration": "tsx src/collaborationServer.ts",
"test": "DATABASE_URL='postgres://dummy:dummy@localhost:5432/dummy' node --experimental-vm-modules node_modules/jest/bin/jest.js"
"collaboration": "tsx src/collaborationServer.ts"
Expand All @@ -19,6 +20,7 @@
"@prisma/adapter-pg": "^7.8.0",
"@prisma/client": "^7.8.0",
"@prisma/config": "^7.8.0",
"@sentry/node": "^8.0.0",
"@stellar/stellar-sdk": "^14.6.1",
"@types/ioredis": "^4.28.10",
"@types/json2csv": "^5.0.7",
Expand Down Expand Up @@ -49,6 +51,14 @@
"@types/bcryptjs": "^2.4.6",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.6",
"@types/jest": "^29.0.0",
"@types/node": "^25.5.0",
"@types/qrcode": "^1.5.5",
"@types/supertest": "^2.0.12",
"@types/ws": "^8.18.1",
"jest": "^29.0.0",
"supertest": "^6.3.3",
"ts-jest": "^29.0.0",
"@types/jest": "^30.0.0",
"@types/node": "^25.5.0",
"@types/qrcode": "^1.5.5",
Expand Down
Loading