diff --git a/README.md b/README.md index d1196d3..ca5b602 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,139 @@ -# Project Setup Guide +

+ Aossie Logo +

-## Backend Setup +

+ AOSSIE | DebateAI +

-1. Navigate to the backend directory: - ```sh +--- + +## About DebateAI + +**DebateAI** is an AI-enhanced, real-time debating platform designed to sharpen communication skills. Whether competing against human opponents or LLM-powered AI challengers, users can participate in structured debates that mimic formal competitions. + +### Key Features + +- **User vs. User Debates** + - Real-time debates via **WebSockets**, **WebRTC** (audio/video/text) + - Structured formats: **opening**, **cross-exam**, and **closing** + +- **User vs. AI Debates** + - LLM-generated counterarguments that adapt to your input + +- **Custom Debate Rooms** + - Create private, topic-specific debate spaces + +--- + +## Project Setup Guide + +### Backend Configuration + +1. Create a file named `config.prod.yml` in the `backend/config/` directory. + +Paste the following configuration: +``` +server: + port: 1313 # The port number your backend server will run on + +database: + uri: "mongodb+srv://:@/" + # Replace with your MongoDB Atlas connection string + # Get this from your MongoDB Atlas dashboard after creating a cluster and database + +gemini: + apiKey: "" + # API key for OpenAI / Gemini model access + # Obtain from your OpenRouter.ai or OpenAI account dashboard + +jwt: + secret: "" + # A secret string used to sign JWT tokens + # Generate a strong random string (e.g. use `openssl rand -hex 32`) + + expiry: 1440 + # Token expiry time in minutes (e.g. 1440 = 24 hours) + +smtp: + host: "smtp.gmail.com" + # SMTP server host for sending emails (example is Gmail SMTP) + + port: 587 + # SMTP server port (587 for TLS) + + username: "" + # Email username (your email address) + + password: "" + # Password for the email or app-specific password if 2FA is enabled + + senderEmail: "" + # The 'from' email address used when sending mails + + senderName: "DebateAI Team" + +googleOAuth: + clientID: "" + # Google OAuth Client ID for OAuth login + # Obtain from Google Cloud Console (APIs & Services > Credentials > OAuth 2.0 Client IDs) +``` + +> **Note**: Do **not** commit this file to a public repository. Use `.gitignore`. + +--- + +### Running the Backend (Go) + +1. Navigate to the backend folder: + ``` cd backend ``` -2. Run the backend server: - ```sh + +2. Initialize Go modules (if not already done): + ``` + go mod tidy + ``` + +3. Run the server: + ``` go run cmd/server/main.go ``` -## Frontend Setup +--- + +### Running the Frontend (React + Vite) -1. Navigate to the frontend directory: - ```sh +1. Open a new terminal and navigate to the frontend directory: + ``` cd frontend ``` + 2. Install dependencies: - ```sh + ``` npm install ``` -3. Create an environment file: - - Create a `.env` file in the frontend directory. - - Add the following environment variables: - ```sh - VITE_BASE_URL="http://localhost:" - ``` + +3. Create a `.env` file and add: + ``` + VITE_BASE_URL="http://localhost:1313" + ``` + 4. Start the development server: - ```sh + ``` npm run dev ``` -## Setting Up Amazon Cognito - -Follow these steps to configure Amazon Cognito for authentication: - -1. **Navigate to Cognito** - - Go to the [AWS Management Console](https://aws.amazon.com/console/) and open Cognito. - -2. **Create a User Pool** - - Configure authentication settings as per your requirements. - -3. **Retrieve Credentials** - - Once the User Pool is set up, obtain the necessary credentials: - - **User Pool ID** - - **App Client ID** +--- -4. **Update Application Configuration** - - Add the retrieved credentials to your application's configuration file (e.g., `config.yml`). - - Enable the following settings in Cognito's app-client: - - Choice-based sign-in - - Username and password authentication - - Get user tokens from existing authenticated sessions - - Secure Remote Password (SRP) protocol +## Contributing -For more details, refer to the [official AWS documentation](https://docs.aws.amazon.com/cognito/). +Want to contribute to DebateAI? Reach out to [Bhavik Mangla](https://github.com/bhavik-mangla) and [Rishit Tiwari](https://github.com/rixitgithub). Contributions that enhance accessibility, features, or performance are always welcome. -## Setting Up OpenAI API Key +--- -To use OpenAI services, obtain an API key from OpenRouter: +## License -1. Visit [OpenRouter](https://openrouter.ai/) and sign up if you don't have an account. -2. Generate an API key from your OpenRouter dashboard. -3. Add the API key to your `config.yml` file. +MIT © [AOSSIE](https://aossie.org) --- - -This guide follows the project implementation approach. If you encounter any issues, check the AWS documentation or relevant project files.