Image Repository
Image Repository API that captures the following use cases from the Shopify developer challenge:
- ADD image(s) to the repository
- upload a single image at a time
- private or public (permissions)
- secure uploading and stored images
Design
Some interesting things I explored while building this API:
- Use Entity Framework Core for persistence
- Implement Unit of Work and Repository design patterns
- Use JSON Web Tokens for endpoint authorization
- Setup Swagger to have a friendly api interface
Run
Make sure you have .NET 5. You can download it here.
Clone the repo
git clone https://github.com/yaseribrahim/ImageRepository.git
Run the project
dotnet run
The Swagger UI webpage at https://localhost:5001 should open
To make requests with authorization headers
- Get JWT by signing up/logging in
- Hit Authorize Button and enter token
Notes
I wrote a blog post while working on this project: https://yaseribrahim.medium.com/simple-jwt-authentication-with-swagger-for-net-web-api-35595c151c7c