Icora API is a RESTful service designed to manage and serve icon components efficiently.
It enables developers to retrieve only the icons they need, reducing dependency bloat and improving application performance.
- Retrieve icons by library and name
- Folder-based icon organization
- Fetch entire icon collections
- Optimized icon content formatting
- Built-in rate limiting and caching
- Compression-enabled responses
- Secure API with CORS and HTTP headers
The API follows a modular REST architecture:
- Controller Layer – Handles request/response lifecycle
- Service Layer – Business logic for icon retrieval and formatting
- Data Layer (NEON DB) – Stores icon metadata and content
- Middleware Layer – Handles security, rate limiting, and validation
Client → Express API → Service Layer → NEON DB → Response
- Node.js
- TypeScript
- Express.js
- NEON DB (PostgreSQL)
- dotenv
- Node.js (v14+)
- npm or yarn
- NEON DB project with credentials
Create a .env file:
PORT=4000
NODE_ENV=development
DATABASE_URL
# Clone repository
git clone [your-repo-url]
# Install dependencies
npm install
# Build project
npm run build
# Start server
npm startnpm run devGET /
Returns: "Iconium API is running!"
GET /api/icons?library={library}&name={name}
Query Parameters:
- library (string, required)
- name (string, required)
Rate Limit: 100 requests / 15 minutes
Cache Duration: 1 hour
GET /api/icons/:library
Path Parameters:
- library (string)
Rate Limit: 100 requests / 15 minutes
Cache Duration: 1 hour
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
- Helmet (secure HTTP headers)
- CORS configuration
- Input validation & sanitization
- Rate limiting
- Response compression (gzip)
- Cache-Control headers
- Optimized database queries
- Reduced payload size for icons
The current implementation is designed for simplicity and rapid iteration.
Future improvements aim to evolve Icora into a scalable, production-grade system:
- Separate API, processing, and storage services
- Introduce microservices or modular monolith structure
- Serve icons via CDN for faster global access
- Reduce API load for static content
- Add Redis for frequently requested icons
- Improve rate limiting performance
Example: icora add home user settings
-
Add pagination support for large icon libraries:
limitandoffsetquery parameters- Example: GET /api/icons/:library?limit=50&offset=0
-
Improve performance when handling large datasets
-
Reduce payload size for faster responses
-
Enable frontend infinite scrolling or lazy loading
Future enhancements:
- Cursor-based pagination for better scalability
- Filtering and sorting (e.g., by popularity, category)
- Fork the repo
- Create a branch (feature/your-feature)
- Commit changes
- Push and open PR
- npm run dev – Start development server
- npm run build – Build project
- npm start – Run production server
- npm run postinstall – Auto build
ISC