A secure and scalable note-taking API built with ASP.NET Core, designed to demonstrate real-world backend development skills. It features clean architecture, authentication, ownership control, and flexible search capabilities.
- ASP.NET Core 8 — Web API framework
- Entity Framework Core — ORM for database access
- SQL Server — Relational database
- AutoMapper — Object-to-object mapping between entities and DTOs
- Cookie Authentication — Secure user login and session management
- LINQ — Querying and filtering data
- Swagger / Swashbuckle — API documentation and testing
- Clean Architecture Principles — Layered separation of concerns
- C# 11 — Modern language features
- Visual Studio 2022 — Development environment
- 🔐 Authentication with Cookie & Claims — Secure login flow with user identity stored in claims
- 👤 User Ownership Enforcement — Only the owner of a note can view, update, or delete it
- 🔍 Flexible Search API — Search notes by title, content, or tags using OR logic
- 📄 DTO Mapping with AutoMapper — Clean separation between entities and exposed data
- 🧱 Clean Architecture — Layered structure for scalability and maintainability
- 🧠 User-Specific Filtering — Logged-in users can retrieve only their own notes
- 🛡️ Secure Configuration — Sensitive data excluded from public repositories
- 📚 Ready for Extension — Easily add roles, date filters, dashboards, or UI
- NotesApp.Api/ # Controllers and API configuration
- NotesApp.Application/ # Services, DTOs, business logic
- NotesApp.Domain/ # Entities and interfaces
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/notes |
Create a new note |
GET |
/api/notes |
Get all notes |
GET |
/api/notes/my-notes |
Get notes for the logged-in user |
GET |
/api/notes/{id} |
Get a specific note (ownership enforced) |
PUT |
/api/notes/{id} |
Update a note (ownership enforced) |
DELETE |
/api/notes/{id} |
Delete a note (ownership enforced) |
POST |
/api/notes/search |
Search notes by title, content, or tags |
To run the project locally:
- Clone the repository
git clone https://github.com/AbdolrezaKalantari/Note-taking-API.git
- **Configure the connection string
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "ConnectionStrings": { "DefaultConnection": "YourConnectionStringHere" }, "AllowedHosts": "*" } - **(Optional) Update the design-time DbContext factory if you're using EF Core CLI tools (e.g., dotnet ef migrations), make sure the connection string in AppDbContextFactory.cs is correct:
optionsBuilder.UseSqlServer("YourConnectionStringHere");🚀 Ready to build, learn, and showcase — NotesApp is complete.
