# AI-Powered Student Academic Support and Learning Resource Platform
Modular PHP/MySQL system with signup/login, session-based student profiles, an OpenAI-backed academic chatbot, academic challenge identification, profile-aware learning resource recommendations, REST APIs, and responsive student/admin UIs.
## Structure
- `backend/api/index.php` REST front controller
- `backend/auth` signup, login, logout, current session, and university-session bridging
- `backend/chatbot` OpenAI integration, chatbot service, chat logs
- `backend/knowledge` approved institutional guidance used as chatbot memory
- `backend/recommendation` resource matching and recommendation logging
- `backend/student` student profiles and academic challenge tracking
- `backend/admin` resource and log management service
- `backend/config` environment and database configuration
- `frontend` chat and recommendation interface
- `database/schema.sql` MySQL schema and starter resources
## Setup
1. Create a MySQL database by importing `database/schema.sql`.
2. Copy `.env.example` to `.env`.
3. Set `OPENAI_API_KEY` in `.env`.
4. Confirm the database values in `.env` match your XAMPP MySQL setup.
5. Run `database/migration_002_profiles_challenges.sql` if you already installed an older version.
6. Run `database/migration_003_auth_history.sql` if you already installed an older version.
7. Run `database/migration_004_institutional_memory_staff_sessions.sql` if you already installed an older version.
8. Visit `
localhost`.
9. Create the first account. The first account in a fresh installation becomes admin automatically.
10. Visit `
localhost` for the admin console.
11. Visit `
localhost` for the lecturer workspace.
The API also works through `backend/api/index.php`, for example:
`
localhost`
If Apache rewrite is enabled, these clean en …