Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions DOCS/Setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Project Setup Guide

## Backend Go Setup

1. Navigate to the backend directory:
```sh
cd ./backend
```
2. Run the backend server:
```sh
go run cmd/server/main.go
```

## Backend Flask Setup

This document explains how to set up the Flask backend for the AI debate analysis project.
1. cd backend
2. python -m venv venv
3.
On Linux/MacOS:
source venv/bin/activate

On Windows:
venv\Scripts\activate

4. pip install -r requirements.txt

5. Rename .env.example file to .env file

6. Generate Your API keys from https://openrouter.ai/
7. Run the application using python main.py



## Frontend Setup

1. Navigate to the frontend directory:
```sh
cd ./frontend
```
2. Install dependencies:
```sh
npm install
```
3. 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`).

For more details, refer to the [official AWS documentation](https://docs.aws.amazon.com/cognito/).

---

This guide follows the approach used in the project implementation. If you encounter any issues, check the AWS documentation or relevant project files.

10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Project Setup Guide
# DebateAI
DebateAI is an interactive debating platform that allows users to engage in debates with both AI and real users. The project is built using multiple technologies, integrating real-time WebSocket communication and AI-based argument analysis.

## 🛠️ Tech Stack
### **Backend**
- **Go** (WebSockets) – Real-time User vs User debates.
- **Flask** (REST API) – User vs AI debates and AI analysis.

## Backend Setup

1. Navigate to the backend directory:
```sh
Expand Down Expand Up @@ -67,4 +72,5 @@ To use OpenAI services, obtain an API key from OpenRouter:

---


This guide follows the project implementation approach. If you encounter any issues, check the AWS documentation or relevant project files.
11 changes: 6 additions & 5 deletions backend/cmd/server/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package main

import (
"log"
"strconv"

"arguehub/config"
"arguehub/routes"
"arguehub/services"
"arguehub/websocket"
"log"
"strconv"

"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
Expand Down Expand Up @@ -51,8 +51,9 @@ func setupRouter(cfg *config.Config) *gin.Engine {
router.POST("/forgotPassword", routes.ForgotPasswordRouteHandler)
router.POST("/confirmForgotPassword", routes.VerifyForgotPasswordRouteHandler)
router.POST("/verifyToken", routes.VerifyTokenRouteHandler)

router.GET("/ws", websocket.WebsocketHandler)
router.GET("/debate/ws", services.DebateHandler)

return router
return router
}
Loading