How malik-sani/research-opportunity-portal works
The University Research Opportunity Portal lets users browse and manage research opportunities through a browser UI, an HTTP/JSON API, and MySQL. The main workflow covers listing and viewing opportunities, creating or editing them, closing them, and deleting them; the API validates requests and persists changes. The sampled frontend and server code show these interactions and database queries. The README documents the MySQL schema and API capabilities; implementation details beyond the sampled files are not assumed.
Main entry points: server.js REST API · schema.sql Opportunity database · script.js Opportunity UI
Components 10
Browser interface
- Opportunity UI
frontend/script.js
API service
- REST API
backend/server.js - Request validation
backend/server.js - Create opportunity
backend/server.js - List opportunities
backend/server.js - View opportunity
backend/server.js - Update or close
backend/server.js - Delete opportunity
backend/server.js
Data storage
- Opportunity database
database/schema.sql
Other components
- Portal user
Connections 14
- Portal user → Opportunity UI: uses
README.md - Opportunity UI → REST API: requests JSON
frontend/script.js - REST API → Create opportunity: routes POST
backend/server.js - REST API → List opportunities: routes GET
backend/server.js - REST API → View opportunity: routes GET by ID
backend/server.js - REST API → Update or close: routes PUT
backend/server.js - REST API → Delete opportunity: routes DELETE
backend/server.js - Create opportunity → Request validation: validates input
backend/server.js - Update or close → Request validation: validates merged data
backend/server.js - Create opportunity → Opportunity database: inserts and reads
backend/server.js - List opportunities → Opportunity database: reads list
backend/server.js - View opportunity → Opportunity database: reads record
backend/server.js - Update or close → Opportunity database: reads and updates
backend/server.js - Delete opportunity → Opportunity database: deletes record
backend/server.js