πͺ A comprehensive coin analysis and cataloging application with AI-powered identification, valuation, and eBay integration.
Named after the Greek word for "money", Nomisma honors the history of coinage at the heart of this project.
Scanning of new coins :
Analysis of the Coin using Gemini:
Results of the scan and recommended pricing:
Managing the Collections:
Sending your coin to eBay:
- π¬ Digital Microscope Integration - Capture high-resolution coin images using USB microscopes (DM7-Z01C or compatible)
- π€ AI-Powered Analysis - Automatic coin identification, grading, and defect detection using Google Gemini Vision
- π° Value Estimation - AI-driven market value estimates based on condition and rarity
- π Comprehensive Cataloging - Track coins with detailed metadata, images, and analysis history
- π Advanced Search - Search by inventory number, country, year, denomination, and more
- π eBay Integration - One-click listing creation with pre-populated data
- π¦ Docker Deployment - Fully containerized for easy setup and deployment
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/nikolareljin/nomisma/main/setup.sh | bashWindows (PowerShell):
powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/nikolareljin/nomisma/main/setup.ps1 | iex"- Docker and Docker Compose installed
- USB digital microscope (optional, for scanning)
- Google Gemini API key (for AI analysis)
- eBay Developer credentials (optional, for marketplace integration)
-
Clone the repository
cd /home/nikos/Projects/nomisma -
Initialize git submodules
git submodule update --init --recursive # Or simply run: ./update -
Configure environment variables
cp .env.example .env # Edit .env and add your API keys nano .env -
Start the application
./start
Options:
./start- Start the application./start -b- Rebuild Docker images and start./start -h- Show help message
-
Stop the application
./stop
Options:
./stop- Stop containers (data preserved)./stop -v- Stop and remove volumes (deletes all data)./stop -h- Show help message
The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
-
Get a Gemini API Key (for AI analysis)
- Visit https://makersuite.google.com/app/apikey
- Create a new API key
- Add it to your
.envfile asGEMINI_API_KEY
-
eBay Developer Setup (optional)
- Register at https://developer.ebay.com/
- Create an application to get App ID, Dev ID, and Cert ID
- Generate a User Token
- Add credentials to
.envfile
-
Connect Your Microscope
- Plug in your USB microscope
- The application will auto-detect it on the Scan Coin page
- See docs/MICROSCOPE_SETUP.md for detailed setup
- Navigate to Scan Coin page
- Select your microscope from the dropdown
- Position the coin under the microscope
- Click Capture Image
- AI will automatically analyze the coin
- Review and edit the detected information
- Click Save Coin
- Dashboard: View statistics and recent coins
- Collection: Browse, search, and filter your coins
- Coin Details: View detailed information, AI analysis, and valuations
- Edit: Update coin information as needed
- Open a coin's detail page
- Click List on eBay
- Review the pre-populated listing information
- Adjust pricing and description
- Click Create Listing
nomisma/
βββ backend/ # Python FastAPI backend
β βββ app/
β β βββ routes/ # API endpoints
β β βββ services/ # Business logic
β β βββ models.py # Database models
β β βββ schemas.py # Pydantic schemas
β βββ Dockerfile
β βββ requirements.txt
βββ frontend/ # React frontend
β βββ src/
β β βββ pages/ # React pages
β β βββ components/ # Reusable components
β β βββ api.js # API client
β βββ Dockerfile
β βββ package.json
βββ database/ # PostgreSQL initialization
β βββ init.sql
βββ docs/ # Documentation
βββ images/ # Stored coin images
βββ docker-compose.yml # Container orchestration
βββ docker-compose.microscope.yml # Optional microscope services
βββ log # Stream service logs
βββ start # Start services
βββ stop # Stop services
βββ status # Service status
βββ test # Test runner
βββ update # Sync submodules
βββ setup.sh # Local setup (bash)
βββ setup.ps1 # Local setup (PowerShell)
Once the application is running, visit http://localhost:8000/docs for interactive API documentation.
Key endpoints:
POST /api/microscope/capture- Capture image from microscopePOST /api/ai/analyze- Analyze coin image with AIGET /api/coins- List coins with search/filterPOST /api/coins- Create new coinPOST /api/ebay/list- Create eBay listing
See docs/API.md for complete API reference.
Backend:
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reloadFrontend:
cd frontend
npm install
npm run devAll tests (Docker):
./testSingle suite (Docker):
./test -t backend # backend pytest
./test -t frontend # frontend unit tests
./test -t api # backend /health check
./test -t api -i /path/to/image.jpg # Gemini analysis
./test -t e2e # Playwright E2EBackend (pytest):
cd backend
pip install -r requirements.txt
pytestFrontend unit tests (Vitest):
cd frontend
npm install
npm run testE2E tests (Playwright):
cd frontend
npm install
npx playwright install
npm run test:e2eE2E assumes the frontend is running at http://localhost:3000 and the API at http://localhost:8000. Override with E2E_BASE_URL or API_BASE_URL if needed.
The database schema is automatically initialized on first run. To reset:
docker-compose down -v
docker-compose up -d- Check USB connection
- Verify camera permissions
- Restart Docker containers
- See docs/MICROSCOPE_SETUP.md
- Check logs:
./log -t backend
- Verify your
GEMINI_API_KEYis set in.env - Check API quota at https://makersuite.google.com/
- The app will use mock data if no API key is configured
- Ensure all eBay credentials are in
.env - Verify you're using the correct environment (sandbox vs production)
- Check eBay API status at https://developer.ebay.com/support/api-status
The project includes several utility scripts for managing the application:
Start the Nomisma application
./start # Start normally
./start -b # Rebuild images and start
./start -h # Show helpStop the Nomisma application
./stop # Stop (preserve data)
./stop -v # Stop and remove volumes (deletes data!)
./stop -h # Show helpCheck application status
./status # Show service status
./status -h # Show helpStream logs for a specific service
./log -t backend # Follow backend logs
./log -t frontend # Follow frontend logs
./log -h # Show helpUpdate git submodules (script-helpers)
./update # Update all submodules
./update -h # Show helpNote: If script-helpers is not installed, the other scripts will automatically prompt you to run ./update.
All scripts use the script-helpers library for consistent formatting and error handling.
The project includes automated GitHub Actions workflows that run on every push and pull request to the main branch:
- Backend Testing: Python linting and dependency validation
- Frontend Testing: Node.js linting and build verification
- Docker Build: Validates all Docker images build successfully
- Configuration Validation: Checks required files and docker-compose configuration
- Security Scanning: Trivy vulnerability scanner for dependencies
The workflow ensures code quality and prevents broken builds from being merged.
- Backend: Python, FastAPI, SQLAlchemy, PostgreSQL
- Frontend: React, Vite, TailwindCSS, React Query
- AI: Google Gemini Vision API
- Image Processing: OpenCV, Pillow
- Deployment: Docker, Docker Compose, Nginx
MIT License - See LICENSE file for details
For issues and questions:
- Check the documentation
- Review troubleshooting section
- Open an issue on GitHub
Each coin is automatically assigned a unique inventory number in the format NOM-0001, NOM-0002, etc. This short, sequential identifier makes it easy to:
- Label physical storage containers
- Reference coins in conversations
- Maintain organized inventory records
- Track coins across different systems
The inventory number is searchable and displayed prominently throughout the application.
Nomisma (Ξ½ΟΞΌΞΉΟΞΌΞ±) is the Ancient Greek word for money, currency, or a current coin, deriving from nomos (Ξ½ΟΞΌΞΏΟ) meaning "law, custom, or usage," signifying money as something established by convention rather than nature. It specifically referred to official currency, famously the gold Byzantine solidus, and links to the English "numismatics" (study of coins) through Latin.