AICA (AI Communication Assistant) is an intelligent email composition platform designed to help users write clearer, context-aware, and tone-appropriate emails quickly and efficiently. Leverage AI-powered assistance to craft professional communications tailored to your audience and purpose.
For detailed guides, technical info, and step-by-step instructions, visit our wiki:
- Home – Overview, app idea, and motivation
- Core Features – All features available on AICA
- Installation & Setup – How to run the project locally
- Tech Stack – Frontend, backend, and libraries
- Project Structure – Directory structure and file organization
- API Documentation – Comprehensive API reference with examples and error handling
- Our Team - Meet the developers behind AICA
Before starting, ensure you have:
- Node.js v18 or higher
- MongoDB (local) or MongoDB Atlas (cloud)
- OpenAI API Key
- Auth0 Account
- Microsoft Azure Account (optional, for Outlook integration)
git clone https://github.com/Etown-CS170/2025-AICA.git
cd 2025-AICAnpm run install:allThis installs all dependencies for root, backend, and frontend.
Copy the example environment file and configure it:
cd backend
cp .env.example .envThen edit backend/.env with your credentials:
# Server Configuration
PORT=3000
NODE_ENV=development
CORS_ORIGIN=http://localhost:4200
# Auth0 Configuration
AUTH0_DOMAIN=your-auth0-domain.auth0.com
AUTH0_AUDIENCE=https://aica-backend-api
# OpenAI Configuration
OPENAI_API_KEY=sk-your-openai-api-key-here
# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017/aica
# Or for MongoDB Atlas:
# MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/aica
# Microsoft Outlook Configuration (Optional)
MICROSOFT_CLIENT_ID=your-microsoft-client-id
MICROSOFT_CLIENT_SECRET=your-microsoft-client-secret
MICROSOFT_REDIRECT_URI=http://localhost:4200/outlook/callbackGet your credentials:
- OpenAI API Key: OpenAI Dashboard
- Auth0 Domain & Audience: Auth0 Dashboard
- MongoDB URI: Local installation or MongoDB Atlas
- Microsoft Client ID & Secret: Azure Portal (optional)
Update frontend/src/environments/environment.ts:
export const environment = {
production: false,
apiUrl: 'http://localhost:3000/api',
auth0: {
domain: 'your-auth0-domain.auth0.com',
clientId: 'your-auth0-client-id',
authorizationParams: {
redirect_uri: window.location.origin,
audience: 'https://aica-backend-api'
},
cacheLocation: 'localstorage' as const,
useRefreshTokens: true
},
microsoft: {
clientId: 'your-microsoft-client-id',
redirectUri: 'http://localhost:4200/outlook/callback',
tenantId: 'common'
}
};Replace placeholders:
your-auth0-domain→ Your Auth0 domainyour-auth0-client-id→ Your Auth0 client IDyour-microsoft-client-id→ Your Microsoft client ID (optional)
.env files or API keys to version control!
- Create a Single Page Application in Auth0
- Set Allowed Callback URLs:
http://localhost:4200 - Set Allowed Logout URLs:
http://localhost:4200 - Set Allowed Web Origins:
http://localhost:4200 - Create an API with identifier:
https://aica-backend-api
- Go to Azure Portal
- Navigate to App registrations → New registration
- Set Redirect URI:
http://localhost:4200/outlook/callback - Under API permissions, add:
Mail.SendMail.ReadUser.Readoffline_access
- Under Certificates & secrets, create a New client secret
- Copy the Application (client) ID and Client secret value
Local MongoDB:
# macOS/Linux
sudo systemctl start mongod
# Or start via MongoDB CompassMongoDB Atlas:
- Ensure your cluster is running
- Verify IP whitelist includes your current IP
npm run devThis starts both servers concurrently:
- Backend: http://localhost:3000
- Frontend: http://localhost:4200
Expected output:
✅ MongoDB connected successfully
🚀 AICA Backend Server running on port 3000
📧 Environment: development
cd backend
npm install
npm run devcd frontend
npm install
npm start- Open browser to http://localhost:4200
- You should see the AICA login page
- Click Sign In to test Auth0 authentication
- After login, test email generation:
- Select a tone (Professional, Friendly, etc.)
- Select an audience (Professor, Student, etc.)
- Enter a prompt or use a template
- Click Send to generate an email
- (Optional) Test Outlook integration:
- Click the Settings icon (⚙️)
- Navigate to Outlook Integration section
- Click Connect Outlook
- Authorize AICA to access your Outlook account
- Generate an email and click Send via Outlook
