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.
- 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.
- 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.
This project follows the principles of Clean Architecture, ensuring separation of concerns and maintainability. The solution is divided into several layers:
-
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
- Configuration
- Data
- Migrations
- Repositories
Ensure you have the following installed on your machine:
- .NET SDK
- SQL Server
- Visual Studio 2022 (or any other IDE that supports .NET Core development)
-
Clone the repository:
git clone https://github.com/ahmed-ateya1/StackOverFlow-clone.git cd stackoverflow-clone -
Set up the database:
- Update the connection string in
appsettings.jsonto point to your SQL Server instance. - Run the following command in the Package Manager Console (PMC) to apply migrations:
Update-Database
- Update the connection string in
-
Run the application:
- Use Visual Studio or the command line to run the project:
dotnet run
- Register a new account or log in with an existing one.
- Ask a question by clicking the "Add Question" button.
- Browse questions on the home page and click on a question title to view its details.
- Provide an answer to a question, if logged in.
- Vote on answers by clicking the upvote or downvote buttons.
- Edit or delete your own questions and answers by using the provided icons.
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.
If you have any questions or feedback, feel free to contact the project maintainer at ahmed.ateya12348@gmail.com