InfoCenterAI is a full-stack university assistant platform:
- Frontend: React + Vite (student/admin UI)
- Backend: Spring Boot + PostgreSQL (auth, chat, requests, Drive integration)
- AI retrieval pipeline: n8n workflow + Pinecone + LLM providers
This guide covers first-time setup and local run.
Install these tools first:
- Node.js 20+
- npm 10+
- Java 25
- Maven 4 (or use the included
mvnwwrapper) - PostgreSQL 14+
- n8n instance (local or hosted)
- A Google Cloud project with Google Drive API enabled
client/→ React frontendserver/→ Spring Boot backendworkflow.json→ n8n workflow used for Drive ingestion + AI retrievaldb.sql→ database schema reference
- Create a PostgreSQL database named
infocenterai(or use your own name). - Configure backend DB env vars (see section 5).
- The backend uses
spring.jpa.hibernate.ddl-auto=update, so schema can be auto-managed at startup.- You can still use
db.sqlas reference when needed.
- You can still use
You must create OAuth credentials in GCP for Google Drive access.
- In Google Cloud Console:
- Enable Google Drive API.
- Create OAuth 2.0 Client ID credentials.
- Download the OAuth client file and save it as:
server/src/main/resources/credentials.json
This is the
credentials.jsonfile referenced by the project setup. Keep it private.
The backend expects:
GOOGLE_CREDENTIALS_BASE64= Base64 content of your GCPcredentials.jsonGOOGLE_REFRESH_TOKEN= refresh token for the same OAuth client
These are read by GoogleDriveService to authenticate Drive API calls.
Set these environment variables before running backend:
SPRING_DATASOURCE_URL(default:jdbc:postgresql://localhost:5432/infocenterai)SPRING_DATASOURCE_USERNAME(default:postgres)SPRING_DATASOURCE_PASSWORD(default:1235)JWT_SECRET_KEY(optional override)GOOGLE_CREDENTIALS_BASE64(required)GOOGLE_REFRESH_TOKEN(required)N8N_AI_WEBHOOK_URL(optional override, default:https://n8n-service-scmr.onrender.com/webhook/message)
From server/:
./mvnw spring-boot:runWindows:
mvnw.cmd spring-boot:runBackend runs on http://localhost:8080.
Swagger UI: http://localhost:8080/swagger-ui.html
Create client/.env with:
VITE_API_URL=http://localhost:8080
VITE_DRIVE_KNOWLEDGE_BASE_FOLDER_ID=YOUR_KNOWLEDGE_BASE_FOLDER_ID
VITE_DRIVE_REQUESTS_FOLDER_ID=YOUR_REQUESTS_FOLDER_IDAll client environment variables used by the app are:
VITE_API_URL(required)
Base URL of the backend API (example:http://localhost:8080).VITE_DRIVE_KNOWLEDGE_BASE_FOLDER_ID(required)
Google Drive folder ID used for the knowledge-base files (admin dashboard upload/list).VITE_DRIVE_REQUESTS_FOLDER_ID(required)
Google Drive folder ID used for generated/processed request files.
From client/:
npm install
npm run devFrontend runs on Vite default URL (usually http://localhost:5173).
- Import
workflow.jsoninto your n8n instance. - Configure credentials used by workflow nodes:
- Google Drive OAuth2
- Pinecone
- Gemini / OpenRouter / DeepSeek (as used in your instance)
- Verify folder IDs and webhook URLs in the imported workflow.
For this project setup (Docker-oriented), Google credentials are injected via environment variables:
GOOGLE_CREDENTIALS_BASE64GOOGLE_REFRESH_TOKEN
So the backend does not require an interactive Google login on first run.
Only n8n credentials may require OAuth login if they are not already configured in your n8n instance.
If you need to connect n8n manually, use the Google account that has access to the knowledge-base folder id you set in client/.env (VITE_DRIVE_KNOWLEDGE_BASE_FOLDER_ID) and in workflow.json.
- Start PostgreSQL
- Start backend (
server) - Start frontend (
client) - Start/enable n8n workflow
- Test by uploading/updating a file in the configured Google Drive folder
- Backend starts with no missing env var errors
- Login/register works from frontend
- Admin pages can list Drive files
- n8n workflow receives Drive create/update events
- Chat requests receive AI responses
- Never commit real
credentials.json, refresh tokens, or API secrets. - Rotate secrets if they were exposed.
- Restrict OAuth credentials to trusted redirect URIs and accounts.