Skip to content

This project is a simplified clone of the popular StackOverflow platform, built using ASP.NET Core. It allows users to ask questions, answer them, and engage in discussions around specific topics. The application features user authentication, question categorization, voting on answers, and more.

Notifications You must be signed in to change notification settings

ahmed-ateya1/StackOverFlow-clone

Repository files navigation

StackOverflow Clone

Description

This project is a simplified clone of the popular StackOverflow platform, built using ASP.NET Core. It allows users to ask questions, answer them, and engage in discussions around specific topics. The application features user authentication, question categorization, voting on answers, and more.

Features

  • User Authentication: Secure user registration and login using ASP.NET Core Identity.
  • Ask Questions: Authenticated users can ask questions and categorize them.
  • Answer Questions: Users can provide answers to questions asked by others.
  • Vote on Answers: Users can upvote or downvote answers, influencing their visibility.
  • Question and Answer Management: Users can edit or delete their own questions and answers.
  • Search Functionality: Search for questions by keywords.
  • Responsive Design: The application is fully responsive and works well on different devices.
  • Real-Time Validation: Client-side validation for forms to ensure correct data entry.

Technologies Used

  • ASP.NET Core: The primary framework for building the web application.
  • Entity Framework Core: ORM for database management.
  • Bootstrap: Front-end framework for responsive design.
  • SQL Server: The relational database used for data storage.
  • Razor Pages: For rendering dynamic content on the web pages.
  • JavaScript: For handling client-side interactivity.

Clean Architecture

This project follows the principles of Clean Architecture, ensuring separation of concerns and maintainability. The solution is divided into several layers:

Project Structure

Core Layer

  • Domain

    • Entities: Contains the core business entities.
    • IdentityEntities: Contains identity-related entities.
    • RepositoryContracts: Contains interface definitions for repositories.
  • DTO

    • AnswerAddRequest.cs
    • AnswerResponse.cs
    • AnswerUpdateRequest.cs
    • CategoryAddRequest.cs
    • CategoryResponse.cs
    • CategoryUpdateRequest.cs
    • LoginDTO.cs
    • QuestionAddRequest.cs
    • QuestionResponse.cs
    • QuestionUpdateRequest.cs
    • RegisterDTO.cs
    • VoteAddRequest.cs
    • VoteResponse.cs
  • Enumeration

    • Helper
    • Services
    • ServiceContracts

Infrastructure Layer

  • Configuration
  • Data
  • Migrations
  • Repositories

Prerequisites

Ensure you have the following installed on your machine:

Installation

  1. Clone the repository:

    git clone https://github.com/ahmed-ateya1/StackOverFlow-clone.git
    cd stackoverflow-clone
  2. Set up the database:

    • Update the connection string in appsettings.json to point to your SQL Server instance.
    • Run the following command in the Package Manager Console (PMC) to apply migrations:
    Update-Database
  3. Run the application:

    • Use Visual Studio or the command line to run the project:
    dotnet run

Usage

  1. Register a new account or log in with an existing one.
  2. Ask a question by clicking the "Add Question" button.
  3. Browse questions on the home page and click on a question title to view its details.
  4. Provide an answer to a question, if logged in.
  5. Vote on answers by clicking the upvote or downvote buttons.
  6. Edit or delete your own questions and answers by using the provided icons.

Contributing

Contributions are welcome! Please fork the repository and use a feature branch. Pull requests should include tests and follow the coding standards used in this project.

Contact

If you have any questions or feedback, feel free to contact the project maintainer at ahmed.ateya12348@gmail.com

About

This project is a simplified clone of the popular StackOverflow platform, built using ASP.NET Core. It allows users to ask questions, answer them, and engage in discussions around specific topics. The application features user authentication, question categorization, voting on answers, and more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published