{"id":24637868,"url":"https://github.com/obaa10/stack-overflow","last_synced_at":"2026-05-05T13:31:39.299Z","repository":{"id":269953673,"uuid":"908949146","full_name":"Obaa10/Stack-Overflow","owner":"Obaa10","description":"Stack Overflow-like platform where users can post questions and answers, including features like voting, AI-generated answers, and similarity-based search.","archived":false,"fork":false,"pushed_at":"2024-12-27T11:33:12.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T10:12:11.167Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Obaa10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-27T11:16:40.000Z","updated_at":"2024-12-27T11:33:16.000Z","dependencies_parsed_at":"2024-12-27T12:35:20.033Z","dependency_job_id":null,"html_url":"https://github.com/Obaa10/Stack-Overflow","commit_stats":null,"previous_names":["obaa10/stack-overflow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Obaa10%2FStack-Overflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Obaa10%2FStack-Overflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Obaa10%2FStack-Overflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Obaa10%2FStack-Overflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Obaa10","download_url":"https://codeload.github.com/Obaa10/Stack-Overflow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244584346,"owners_count":20476524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-25T10:12:12.948Z","updated_at":"2025-10-26T23:15:08.407Z","avatar_url":"https://github.com/Obaa10.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stack Overflow Clone\n\nThis project is a Stack Overflow-like platform where users can post questions and answers, including features like voting, AI-generated answers, and similarity-based search.\n\n## Features\n\n### Mandatory Requirements\n\n1. **User Registration \u0026 Login**:\n   - Users can register and log in to the platform.\n2. **Question CRUD**:\n   - Create, read, update, and delete questions.\n3. **Answer CRUD**:\n   - Create, read, update, and delete answers.\n4. **Question Search**:\n   - Search for questions by keywords or related topics.\n5. **Edit Requests**:\n   - Users can submit edit requests for questions or answers.\n   - Owners can approve or reject edit requests.\n\n### Optional Features\n\n1. **Voting System**:\n   - Users can vote on questions and answers (upvote/downvote).\n2. **AI-Generated Answers**:\n   - An AI-generated answer is automatically created whenever a question is posted using open-ai.\n3. **Similarity-Based Search**:\n   - Search for similar questions using vector-based search using TfIdf.\n4. **Dockerization**:\n   - The application is Dockerized for easy deployment.\n\n## Installation\n\n### Prerequisites\n\n- Node.js (\u003e=16.x)\n- NestJS CLI (optional)\n- Docker (if running with Docker)\n- MySQL database\n\n### Steps\n\n1. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n2. Set up environment variables:\n   Create a `.env` file in the root of the project with the following values:\n\n   ```env\n   DATABASE_HOST=\u003cyour_database_host\u003e\n   DATABASE_PORT=\u003cyour_database_port\u003e\n   DATABASE_USER=\u003cyour_database_user\u003e\n   DATABASE_PASSWORD=\u003cyour_database_password\u003e\n   DATABASE_NAME=\u003cyour_database_name\u003e\n   REDIS_HOST=\u003cyour_redis_host\u003e\n   REDIS_DB=\u003cyour_redis_db\u003e\n   REDIS_PORT=\u003cyour_redis_port\u003e\n   OPENAI_API_KEY=\u003cyour_openai_api_key\u003e\n   EMAIL_USER=\u003cemail_username\u003e\n   EMAIL_PAS=\u003cemail_password\u003e\n   AUTH_TOKEN_JWT_SECRET=\u003cyour_jwt_secret\u003e\n   AUTH_TOKEN_JWT_EXPIRATION=\u003ctoken_expiration_time\u003e\n   AUTH_REFRESH_TOKEN_JWT_SECRET=\u003cyour_refresh_jwt_secret\u003e\n   AUTH_REFRESH_TOKEN_JWT_EXPIRATION=\u003crefresh_token_expiration_time\u003e\n   ```\n\n3. Run database migrations:\n\n   ```bash\n   npm run typeorm migration:run\n   ```\n\n4. Start the development server:\n\n   ```bash\n   npm run start:dev\n   ```\n\n5. Access the application at `http://localhost:3000`.\n\n## Running with Docker\n\n1. Build and start the Docker container:\n\n   ```bash\n   docker-compose up --build\n   ```\n\n2. Access the application at `http://localhost:3000`.\n\n## Project Structure\n\n```\nsrc/\n├── app/                # Main application modules (auth, questions, answers, etc.)\n├── libs/               # Shared libraries and utilities\n├── main.ts             # Application entry point\n```\n\n## API Endpoints\n\n### Authentication\n\n- `POST /auth/register` - Register a new user.\n- `POST /auth/login` - Log in and obtain tokens.\n\n### Questions\n\n- `POST /questions` - Create a question.\n- `GET /questions` - List all questions.\n- `GET /questions/:id` - Retrieve a single question.\n- `PUT /questions/:id` - Update a question.\n- `DELETE /questions/:id` - Delete a question.\n\n### Answers\n\n- `POST /answers` - Create an answer.\n- `GET /answers/:id` - Retrieve an answer.\n- `PUT /answers/:id` - Update an answer.\n- `DELETE /answers/:id` - Delete an answer.\n\n### Voting\n\n- `POST /vote/question/:id` - Vote on a question.\n- `POST /vote/answer/:id` - Vote on an answer.\n\n### Similar Questions Search\n\n- `GET /search/questions` - Query base search with filter.\n- `GET /search/questions/similar` - Search for similar questions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobaa10%2Fstack-overflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobaa10%2Fstack-overflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobaa10%2Fstack-overflow/lists"}