A minimalist Reddit clone built with .NET 9, Razor Pages, and a Web API.
- Project Description
- Features
- Getting Started
- Folder Structure
- Technologies Used
- Contributing
- License
- Contact
This project is a simplified Reddit clone designed to demonstrate best practices in .NET 9 development, including Clean Architecture, API-first design, and modular UI development using Razor Pages. It prioritizes a clean, intuitive user experience with a minimalist design.
- User Authentication and Authorization:
- Registration and login.
- Role-based access control.
- Secure password management.
- Community Management (Subreddits):
- Create and manage communities.
- Subscribe/unsubscribe to communities.
- Display community lists.
- Post Creation and Display:
- Create text and link posts.
- Sort posts (hot, new, top).
- Community association.
- Commenting System:
- Add and reply to comments.
- Edit and delete comments.
- Hierarchical comment display.
- Voting System:
- Upvote and downvote posts and comments.
- Display scores.
- Search Functionality:
- Search for posts and communities.
- User Profiles:
- Display user posts and comments.
- Display joined communities.
- .NET 9 SDK
- Entity Framework Core Tools
- A database system (e.g., PostgreSQL, SQL Server).
- A code editor (e.g., Visual Studio, VS Code).
- Clone the repository:
git clone https://github.com/Riguidix/reddit-clone.git cd RedditClone - Navigate to the API project and update the database connection string in
RedditClone.Api/appsettings.json. - Apply database migrations:
cd RedditClone.Api dotnet ef database update - Navigate to the Web project and update the API base URL in
RedditClone.Web/appsettings.json. - Install necessary front end libraries.
cd RedditClone.Web/wwwroot/lib
- Run the API project:
cd RedditClone.Api dotnet run - Run the Web project in a new terminal:
cd RedditClone.Web dotnet run - Open your browser and navigate to
http://localhost:5000(or the port specified in yourappsettings.json).
RedditClone/
├── RedditClone.Api/
│ ├── Controllers/
│ ├── Data/
│ ├── Models/
│ ├── appsettings.json
│ ├── RedditClone.Api.csproj
│ └── Program.cs
├── RedditClone.Web/
│ ├── Pages/
│ ├── wwwroot/
│ ├── appsettings.json
│ ├── RedditClone.Web.csproj
│ └── Program.cs
├── RedditClone.sln
└── README.md
- .NET 9
- Razor Pages
- ASP.NET Core Web API
- Entity Framework Core
- ASP.NET Core Identity
- JWT Authentication
Contributions are welcome! Please feel free to submit pull requests or open issues to suggest improvements.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Make your changes.
- Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.