Aegis is a web application built with Next.js that helps fight discrimination by enabling people to report, discuss, and generate supportive responses to discriminatory content. It combines a modern React frontend with Appwrite for backend services (auth, database) and integrates generative AI (Gemini/OpenAI) to help produce thoughtful, empathetic responses.
- User authentication and sessions (Appwrite)
- Chat and response generation powered by generative AI
- Simple UI components (Tailwind + Radix + custom components)
- API routes for server-side actions
- Next.js 15 (app router)
- React 19
- Tailwind CSS
- Appwrite (auth, database)
- Google Generative AI / OpenAI (for assistant responses)
- TypeScript
- Deployed site: https://aegis-gamma.vercel.app
Prerequisites
- Node.js (v18+ recommended)
- An Appwrite instance (self-hosted or Cloud) with a project and collections configured
Local development
- Install dependencies
cd "c:\Users\Devad\Downloads\web developement\hackazardproj\aegis"
npm install- Create environment variables
Create a .env.local file in the project root with the variables below (values shown are the variable names used by the project):
NEXT_PUBLIC_APPWRITE_ENDPOINT=<your-appwrite-endpoint>
NEXT_PUBLIC_APPWRITE_PROJECT=<your-appwrite-project-id>
NEXT_PUBLIC_APPWRITE_DATABASE=<your-database-id>
NEXT_PUBLIC_USERS_COLLECTION=<users-collection-id>
NEXT_APPWRITE_KEY=<appwrite-secret-key>
NEXT_PUBLIC_CHAT_COLLECTION=<chat-collection-id>
NEXT_PUBLIC_RESPONSES_COLLECTION=<responses-collection-id>
GEMINI_API_KEY=<gemini-or-google-generative-ai-key>
Notes:
- Keep secrets out of git. Do not commit your
.env.localfile. - The SDKs used in this repository include both
appwriteandnode-appwritedepending on server vs client usage.
- Run the dev server
npm run devApp will be available at http://localhost:3000 by default.
app/- Next.js app routes and pagescomponents/- Reusable React components (Auth, Navbar, UI primitives)lib/- Helper utilities, Appwrite client/config, actionspublic/- Static assetsdocs/- Project documentation and diagrams (contains architecture diagram)
NEXT_PUBLIC_APPWRITE_ENDPOINT- Appwrite server URL (e.g. https://cloud.appwrite.io/v1)NEXT_PUBLIC_APPWRITE_PROJECT- Appwrite project IDNEXT_PUBLIC_APPWRITE_DATABASE- Database id used by the appNEXT_PUBLIC_USERS_COLLECTION- Users collection idNEXT_APPWRITE_KEY- Appwrite secret key for server-side operationsNEXT_PUBLIC_CHAT_COLLECTION- Chat messages collection idNEXT_PUBLIC_RESPONSES_COLLECTION- Responses collection idGEMINI_API_KEY- API key for Google Gemini or other generative AI provider
See docs/architecture.svg for a simple diagram of the system architecture showing how the Next.js frontend, API routes, Appwrite backend, and generative AI services interact.
Lint
npm run lintBuild for production
npm run build
npm startContributions are welcome. Open issues for bugs and feature requests. For pull requests:
- Fork the repo
- Create a feature branch
- Open a PR with a clear description and any relevant screenshots or test notes
Please follow existing code style. The project includes TypeScript and ESLint configurations.
This project may process sensitive user content. Respect user privacy, avoid logging or storing unnecessary personal data, and ensure that any deployment of Appwrite or AI services is configured securely. Do not commit secrets.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev