Prerequisites
Before you begin, ensure you have the following installed:- .NET 10.0 SDK
- SQLite
- Entity Framework Core tools (for migrations)
Setup Workflow
Clone repository and install dependencies
Clone the repository and restore NuGet packages:The project includes these key dependencies:
- Microsoft.EntityFrameworkCore.Sqlite
- Microsoft.AspNetCore.Authentication.JwtBearer
- Microsoft.EntityFrameworkCore.Tools
Configure JWT settings
Set up JWT authentication using .NET user secrets:
The JWT key should be a strong, random string. Keep it secure and never commit it to version control.
Run EF Core migrations
Initialize the database with Entity Framework Core migrations:This creates the SQLite database (
social.db) with all required tables.Start the API
Run the application:The API will start on the default port (typically
http://localhost:5000 or https://localhost:5001).Login and get JWT token
Authenticate to receive an access token:Response:Save the
accessToken for authenticated requests.The API uses SQLite for local development, which stores data in a single file (
social.db). This makes it easy to get started without setting up a separate database server.Next Steps
- Explore the API Reference to see all available endpoints
- Learn about Authentication and token management
- Check out User Management features
- Understand Post Interactions functionality