Welcome to My-Blog, a simple blogging webapp built with popular tech stack to provide a simple and secure blogging experience. This can be a good starter for someone who wants to learn angular + .net api implementation.
- Frontend: Angular
- Backend: .NET Core API 7
- ORM: EF Core
- Database: SQL Server
- Categories: Organize your content seamlessly.
- Blog Posts:
- Link your posts to relevant categories.
- Image Gallery Management: Select or upload images for your blog posts with ease.
- Markdown Support: Preview and display content using markdown for a rich text experience.
- Authentication:
- Register & login using JWT tokens.
- Integration with .NET Core Identity Framework.
- User Roles:
- Reader: Enjoy reading content from various writers.
- Writer: Contribute by writing and managing your blog posts.
- Admin & Roles Seeding: Default seeding for admin and roles to kickstart the platform.
- API Access Control: Manage API access based on user roles.
- Token Management:
- Angular saves the token in cookies upon login.
- Tokens are stored in local storage for further use.
- Auth Guard: Secure your Angular pages with implemented auth guards.
-
Clone the repository:
git clone https://github.com/pratikghag1089/My-Blog.git
-
Navigate to the project directory and install the required packages:
cd My-Blog npm install -
Set up your SQL Server and update the connection string in the
.NET Core APIsettings. -
Run the migrations to set up the database:
Update-Database --Context="ApplicationDbContext" -v Update-Database --Context="AuthDbContext" -v
-
Start the backend server:
dotnet run
-
Navigate to the Angular project directory and start the frontend server:
ng serve
-
Visit
http://localhost:4200/in your browser to access the application.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is MIT licensed.
Created by @pratikghag1089 - Feel free to reach out!