Skip to content

celestiancoder/Aegis

Repository files navigation

Aegis

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.

Key features

  • 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

Tech stack

  • Next.js 15 (app router)
  • React 19
  • Tailwind CSS
  • Appwrite (auth, database)
  • Google Generative AI / OpenAI (for assistant responses)
  • TypeScript

Live demo

Quick start

Prerequisites

  • Node.js (v18+ recommended)
  • An Appwrite instance (self-hosted or Cloud) with a project and collections configured

Local development

  1. Install dependencies
cd "c:\Users\Devad\Downloads\web developement\hackazardproj\aegis"
npm install
  1. 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.local file.
  • The SDKs used in this repository include both appwrite and node-appwrite depending on server vs client usage.
  1. Run the dev server
npm run dev

App will be available at http://localhost:3000 by default.

Project structure (high level)

  • app/ - Next.js app routes and pages
  • components/ - Reusable React components (Auth, Navbar, UI primitives)
  • lib/ - Helper utilities, Appwrite client/config, actions
  • public/ - Static assets
  • docs/ - Project documentation and diagrams (contains architecture diagram)

Environment variables (from lib/appwrite/config.ts)

  • NEXT_PUBLIC_APPWRITE_ENDPOINT - Appwrite server URL (e.g. https://cloud.appwrite.io/v1)
  • NEXT_PUBLIC_APPWRITE_PROJECT - Appwrite project ID
  • NEXT_PUBLIC_APPWRITE_DATABASE - Database id used by the app
  • NEXT_PUBLIC_USERS_COLLECTION - Users collection id
  • NEXT_APPWRITE_KEY - Appwrite secret key for server-side operations
  • NEXT_PUBLIC_CHAT_COLLECTION - Chat messages collection id
  • NEXT_PUBLIC_RESPONSES_COLLECTION - Responses collection id
  • GEMINI_API_KEY - API key for Google Gemini or other generative AI provider

Architecture

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.

Running checks

Lint

npm run lint

Build for production

npm run build
npm start

Contributing

Contributions 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.

Security and privacy

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.


Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •