🌐 IGNOU MCA Study Helper:
https://mcaignoustudyhelperfullstck-production.up.railway.app/
Share the website with MCA students:
🎓 IGNOU MCA Study Helper
📚 Question papers, study material, question banks and video lectures in one place.
🔗 https://mcaignoustudyhelperfullstck-production.up.railway.app/
Node.js ^26.0.0, npm and a local PostgreSQL server are required.
npm.cmd install
npm.cmd run prisma:generate
npm.cmd run prisma:migrate
npm.cmd run prisma:seed
npm.cmd run dev
Open http://127.0.0.1:3000.
For a production-style run:
npm.cmd run build
npm.cmd start
Copy .env.example to .env and set DATABASE_URL before
running Prisma commands. The Express server serves the frontend and owns
application data, authentication, progress and admin APIs. Opening HTML files
directly is no longer the primary application mode.
Email verification is implemented through the Resend Email API. Add these
values to .env before enabling it:
SITE_URL=https://your-public-domain.example
RESEND_API_KEY=re_your_api_key
RESEND_FROM_EMAIL=GyanPath <verify@your-verified-domain.example>
The sender domain must be verified in Resend. Restart the server after changing environment variables, then open Admin > Email Verification and enable the toggle. The API key remains server-side and is never returned to the browser.
When enabled, new accounts receive a single-use verification link that expires after 24 hours. Login is blocked until the link is consumed. Users can request a new link from the Verify Email tab, and changing a profile email triggers a fresh verification requirement. Existing accounts are not retroactively locked.
For local PDF testing, clone or copy the resource repository into:
local-resources/MCA_new
This folder is ignored by Git and is only for local/offline testing. In hosted
environments, set PDF_RESOURCE_BASE_URL to the raw GitHub resource URL, for
example:
https://raw.githubusercontent.com/raaz2507/MCA_IGNOU_Study_matarial/main/MCA_new
Feature implementation progress is tracked in
FEATURE_CHECKLIST.md.
@student mentions, likes, useful reactions and repliesThe first useful communication release should include:
After this foundation is stable, real-time chat, study groups and resource sharing can be added.
The project follows an Express + TypeScript Modular Monolith architecture with a separate modular frontend and backend.
Recommended stack:
Feature logic is isolated into controller, service and repository layers. The frontend communicates with Express through REST APIs; PostgreSQL is the application data source.
mca-study-helper/
|
|-- frontend/
| |
| |-- pages/
| | |-- index.html
| | |-- login.html
| | |-- question-bank.html
| | |-- paper-gallery.html
| | |-- discussion.html
| | |-- chat.html
| | |-- profile.html
| | `-- admin.html
| |
| |-- assets/
| | |-- css/
| | | |-- base.css
| | | |-- layout.css
| | | |-- components.css
| | | `-- pages/
| | | |-- home.css
| | | |-- question-bank.css
| | | |-- discussion.css
| | | `-- chat.css
| | |
| | |-- js/
| | | |-- api/
| | | | |-- auth.api.js
| | | | |-- subjects.api.js
| | | | |-- questions.api.js
| | | | |-- papers.api.js
| | | | |-- discussion.api.js
| | | | |-- chat.api.js
| | | | `-- progress.api.js
| | | |
| | | |-- components/
| | | | |-- header.js
| | | | |-- footer.js
| | | | |-- site-shell.js
| | | | |-- sidebar.js
| | | | |-- modal.js
| | | | |-- subject-card.js
| | | | |-- question-card.js
| | | | `-- paper-card.js
| | | |
| | | |-- pages/
| | | | |-- home.js
| | | | |-- question-bank.js
| | | | |-- paper-gallery.js
| | | | |-- discussion.js
| | | | |-- chat.js
| | | | `-- profile.js
| | | |
| | | `-- utils/
| | | |-- storage.js
| | | |-- theme.js
| | | |-- auth.js
| | | `-- helpers.js
| | |
| | `-- images/
| |
| |-- tools/
| |-- resource-paths.json
| `-- manifest.json
|
|-- backend/
| |
| |-- src/
| | |-- app.ts
| | |-- server.ts
| | |
| | |-- config/
| | | |-- env.ts
| | | |-- prisma.ts
| | | |-- redis.ts
| | | `-- socket.ts
| | |
| | |-- modules/
| | | |-- auth/
| | | |-- catalog/
| | | |-- questions/
| | | |-- progress/
| | | `-- content/
| | |
| | |-- queues/
| | |-- shared/
| | |-- socket/
| | `-- tests/
| |
| |-- prisma/
| | |-- schema.prisma
| | |-- migrations/
| | `-- seed.ts
| |
| |-- uploads/
| | |-- pdfs/
| | |-- images/
| | `-- exports/
| |
| |-- .env.example
| `-- README.md
|
|-- mobile-app/
| `-- (Future React Native App)
|
|-- docs/
| |-- api-docs/
| |-- database/
| `-- architecture/
|
|-- package.json
|-- package-lock.json
|-- tsconfig.json
|-- README.md
`-- .gitignore
Important:
.envwill contain local secrets and must not be committed. A safe.env.examplefile should be committed instead.
Set these variables in the Railway service (do not commit production secrets):
NODE_ENV=production
DATABASE_ADAPTER=prisma
DATABASE_PROVIDER=postgresql
DATABASE_URL=postgresql://...
FRONTEND_ORIGIN=https://your-service.up.railway.app
SITE_URL=https://your-service.up.railway.app
PDF_RESOURCE_BASE_URL=https://raw.githubusercontent.com/OWNER/REPOSITORY/BRANCH/MCA_new
GITHUB_TOKEN=
JWT_ACCESS_SECRET=use-a-long-random-secret
JWT_REFRESH_SECRET=use-a-different-long-random-secret
GITHUB_TOKEN is optional for a public content repository, but recommended to avoid GitHub API rate limits. Give it read-only repository access. The application derives the repository, branch and content root from PDF_RESOURCE_BASE_URL.
Use the repository’s normal build and start commands:
Build: npm run build
Start: npm start
On each successful Railway deployment, startup performs this sequence once:
GitHub sync mirrors repository-managed academic content. Papers and study materials under PDF_RESOURCE_BASE_URL are removed from the database when their GitHub files disappear; subjects under MCA_new/Semester_* are removed when their complete GitHub subject folder disappears. Records outside those managed paths are preserved. A temporary GitHub failure is logged but does not prevent the server from starting.
Admin and Editor users can retry without redeploying from Dashboard → Academic Operations → GitHub Content Sync. The equivalent Railway shell command is:
npm run content:sync:github
For a fresh database, deploy migrations before the first manual sync:
npm run prisma:deploy
npm run content:sync:github
If Prisma reports P1002 while acquiring an advisory lock, another deployment is already running migrations. Wait for that deployment to finish, then retry. If /api/subjects returns [], verify DATABASE_ADAPTER=prisma, confirm that PDF_RESOURCE_BASE_URL points to the MCA_new folder, and run the manual sync command to see the GitHub error directly.
Shared headers, footers and cards are rendered by reusable client-side components. Page files contain placeholders and page-specific content instead of repeating the same layout markup.
Request flow:
Frontend
|
Express REST API / Socket.IO
|
Controller
|
Service
|
Repository
|
Prisma ORM
|
PostgreSQL
Redis is optional during current development. If it is unavailable, the main Express/PostgreSQL application continues running while Redis-backed queues and presence remain disabled.
Resend is also optional at startup. If its credentials are absent, the application continues running but the Admin email-verification toggle remains unavailable.
Question-bank data is stored inside each subject’s data directory. For
example:
frontend/assets/resources/MCA_new/Semester_1/MCS_211/data/
To add real answers, edit each question’s answers.english and
answers.hinglish fields.