A modern favicon generator and management platform built with Angular and NestJS.
a-icon.com is a web service that allows users to:
- Upload images and convert them into multi-size favicon sets (
.ico,.png) - Create favicons from scratch using a built-in drawing canvas
- Browse a directory of published favicons with sorting options
- Get unique URLs for each generated favicon set
- Frontend: Angular 20 with Server-Side Rendering (SSR)
- Backend: NestJS 11 with TypeScript
- Database: SQLite (better-sqlite3)
- Image Processing: Sharp
- Containerization: Docker & Docker Compose
- Infrastructure: DigitalOcean (Terraform)
a-icon.com/
βββ a-icon-api/ # NestJS backend API
β βββ src/
β β βββ favicon/ # Favicon generation & management
β β βββ storage/ # File storage service
β β βββ directory/ # Directory listing
β β βββ database/ # SQLite database module
β βββ Dockerfile
βββ a-icon-web/ # Angular frontend with SSR
β βββ src/
β β βββ app/
β β β βββ upload/ # Upload component
β β β βββ directory/ # Directory listing component
β β βββ server.ts # SSR Express server
β βββ Dockerfile
βββ terraform/ # Infrastructure as Code
βββ docker-compose.yml # Local development
βββ docker-compose.prod.yml # Production deployment
- Node.js 22.12+
- Docker & Docker Compose
- Git
-
Clone the repository
git clone https://github.com/Senneseph/a-icon.com.git cd a-icon.com -
Start the services
docker-compose up
-
Access the application
- Web: http://localhost:4200
- API: http://localhost:3000
- Directory: http://localhost:4200/directory
Backend (API)
cd a-icon-api
npm install
npm run start:devFrontend (Web)
cd a-icon-web
npm install
npm start-
Set up environment variables
# Create .env file (not tracked in git) DO_TOKEN="your_digitalocean_token"
-
Deploy from GitHub
.\deploy-from-github.ps1
This script will:
- Clone the repository on the droplet
- Build Docker images on the server
- Start the containers with production configuration
The a-icon.com droplet can also host multiple static websites with automatic SSL:
# Add a static site
.\add-static-site.ps1 -Domain "iffuso.com"
# Add a subdomain
.\add-static-site.ps1 -Domain "iffuso.com" -Subdomain "angular-press" -SourcePath "./dist"
# List all sites
.\list-static-sites.ps1
# Remove a site
.\remove-static-site.ps1 -Domain "iffuso.com"See STATIC-HOSTING.md for complete documentation.
See DEPLOYMENT.md for detailed deployment instructions.
API (a-icon-api)
NODE_ENV: Environment (development/production)PORT: API port (default: 3000)DB_PATH: SQLite database file pathSTORAGE_ROOT: File storage directory
Web (a-icon-web)
NODE_ENV: Environment (development/production)PORT: Web server port (default: 4000)API_URL_SSR: Server-side API URL for SSR (e.g.,http://api:3000)
API Tests
cd a-icon-api
npm test
npm run test:e2eWeb Tests
cd a-icon-web
npm testPOST /api/favicons/upload- Upload image and generate faviconPOST /api/favicons/canvas- Create favicon from canvas dataGET /api/favicons/:slug- Get favicon metadata
GET /api/directory- List all favicons (supports sorting)- Query params:
sortBy(createdAt/slug),order(asc/desc)
- Query params:
GET /api/storage/*- Serve generated favicon files
GET /api/health- Health check endpoint
docker-compose builddocker-compose -f docker-compose.prod.yml build- All services run in hardened Docker containers
- Non-root users in containers
- Environment-based configuration (no hardcoded secrets)
- Input validation and sanitization
- CORS configuration
UNLICENSED - Private project
Benjamin Hill (Senneseph)
- Repository: https://github.com/Senneseph/a-icon.com
- Production: http://a-icon.com/