Skip to content

GeorgeShani/ArtUnion-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

64 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽจ ArtUnion API

ArtUnion is a comprehensive ASP.NET Web API platform that connects artists and critics, enabling artists to showcase their work and receive professional feedback from critics.

๐Ÿ“‹ Project Overview

ArtUnion API serves as the backend for a portfolio and criticism platform that allows:

  • ๐Ÿ‘จโ€๐ŸŽจ Artists to upload and manage their artwork in personal portfolios
  • ๐Ÿง Critics to provide professional feedback and ratings on artworks
  • ๐Ÿ‘ฅ Users to follow their favorite artists and receive updates
  • ๐Ÿ‘ฎโ€โ™‚๏ธ Administrators to manage the platform's content and categories

๐Ÿ’ป Tech Stack

  • Framework: ASP.NET Core (.NET 6+)
  • ORM: Entity Framework Core
  • Authentication: JWT (JSON Web Tokens)
  • Email Service: SMTP integration
  • Background Jobs: ๐Ÿ”„ Hangfire for automated tasks
  • Cloud Services:
    • โ˜๏ธ AWS RDS for database
    • ๐Ÿ“‚ AWS S3 for artwork image storage
  • Design Patterns: Repository Pattern
  • Tools:
    • ๐Ÿ”„ AutoMapper for object mapping
    • โœ… FluentValidation for Model validation
    • ๐Ÿ“„ Pagination for large data sets
    • ๐Ÿ›ก๏ธ Proper error handling and logging

โœจ Core Features

๐Ÿ‘ค User Management

  • Multiple user roles: Artist, Critic, Admin
  • User registration and authentication
  • Profile management

๐Ÿ–ผ๏ธ Portfolio & Artwork Management

  • Artists can create and manage portfolios
  • Upload artwork with details (title, description, category)
  • Organize artwork by categories
  • โค๏ธ Like/unlike artwork functionality

๐Ÿ“ Criticism System

  • Critics can provide ratings and textual feedback on artwork
  • Artists receive notifications about new critiques

๐Ÿ”” Subscription System

  • Users can follow artists they like
  • Followers receive notifications about new artwork from artists they follow

๐Ÿ“ง Email Notifications

  • Registration confirmation
  • New criticism alerts
  • New artwork notifications
  • Weekly digest of popular works (automated via Hangfire)

๐Ÿ—„๏ธ Storage

  • Artwork images stored in AWS S3
  • Database hosted on AWS RDS

๐Ÿ”Œ API Endpoints

๐Ÿ” Authentication

  • POST /api/auth/register - Register as Artist or Critic
  • POST /api/auth/login - Login and receive JWT token

๐Ÿ‘ฅ Users

  • GET /api/users - List all users (Admin only)
  • GET /api/users/{id} - Get specific user information
  • PUT /api/users/{id} - Update user information
  • DELETE /api/users/{id} - Delete user (Admin only)

๐Ÿ“ Portfolios

  • GET /api/portfolios - List all portfolios
  • GET /api/portfolios/{id} - View specific portfolio
  • POST /api/portfolios - Create new portfolio (Artist only)
  • PUT /api/portfolios/{id} - Update portfolio (Owner only)
  • DELETE /api/portfolios/{id} - Delete portfolio (Owner/Admin)

๐Ÿ–ผ๏ธ Artworks

  • GET /api/artworks - List artworks with filtering
  • GET /api/artworks/{id} - View specific artwork
  • POST /api/artworks - Add new artwork (Artist only)
  • PUT /api/artworks/{id} - Update artwork (Owner only)
  • DELETE /api/artworks/{id} - Delete artwork (Owner/Admin)
  • GET /api/artworks/category/{categoryId} - Get artworks by category
  • POST /api/artworks/{artworkId}/like - Like/unlike an artwork

๐Ÿท๏ธ Categories

  • GET /api/categories - Get all categories
  • GET /api/categories/{id} - Get specific category
  • POST /api/categories - Add new category (Admin only)
  • PUT /api/categories/{id} - Update category (Admin only)
  • DELETE /api/categories/{id} - Delete category (Admin only)

๐Ÿ“ Critiques

  • GET /api/critiques/artwork/{artworkId} - Get reviews for specific artwork
  • POST /api/critiques - Add review (Critic only)
  • PUT /api/critiques/{id} - Update review (Owner only)
  • DELETE /api/critiques/{id} - Delete review (Owner/Admin)

๐Ÿ”” Subscriptions

  • GET /api/subscriptions/followers/{artistId} - Get artist's followers
  • GET /api/subscriptions/following - Get artists followed by current user
  • POST /api/subscriptions/{artistId} - Follow an artist
  • DELETE /api/subscriptions/{artistId} - Unfollow an artist

๐Ÿ—‚๏ธ Data Models

๐Ÿ‘ค User

  • User information (name, email, password hash, bio, profile image)
  • Role (Artist, Critic, Admin)

๐Ÿ“ Portfolio

  • Title
  • Description
  • Creation date
  • Owner (Artist)

๐Ÿ–ผ๏ธ Artwork

  • Title
  • Description
  • Category
  • Creation date
  • Image URL
  • Portfolio reference

๐Ÿท๏ธ Category

  • Name
  • Description

๐Ÿ“ Critique

  • Rating
  • Comment text
  • Creation date
  • Critic reference
  • Artwork reference

๐Ÿ”” Subscription

  • Follower reference
  • Artist reference
  • Subscription date

โค๏ธ ArtworkLike

  • User reference
  • Artwork reference
  • Liked timestamp

๐Ÿ”’ Authorization Rules

  • API access requires authentication
  • Critique creation limited to users with Critic role
  • Artwork upload limited to users with Artist role
  • Category management limited to users with Admin role
  • Content modification restricted to content owners or administrators

๐Ÿš€ Getting Started

Prerequisites

  • .NET 6 SDK or later
  • AWS account with S3 and RDS access
  • SMTP server access for email notifications

Installation

  1. Clone the repository:
git clone https://github.com/GeorgeShani/ArtUnion-API.git
  1. Navigate to the project directory:
cd ArtUnion-API
  1. Restore NuGet packages:
dotnet restore
  1. Create a .env file with your environment variables.

  2. Apply migrations to create the database:

dotnet ef database update
  1. Run the application:
dotnet run

โš™๏ธ Configuration

The application uses environment variables (.env file) for configuration. Key settings include:

  • ๐Ÿ—„๏ธ Database connection information (AWS RDS)
  • ๐Ÿ” JWT authentication settings
  • ๐Ÿ“ง SMTP configuration for email notifications
  • ๐Ÿ“‚ AWS S3 credentials for artwork storage
  • ๐Ÿ”„ Hangfire configuration for background jobs

๐Ÿ”„ Background Tasks

The application uses Hangfire to schedule and execute background tasks, including:

  • ๐Ÿ“… Weekly digest emails of popular artworks
  • ๐Ÿ“ง Automated email notifications

๐Ÿ“ž Contact

For any questions or suggestions regarding this project, please contact:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages