An API for NFT minting and verification on Firmachain blockchain, supporting the CW721 standard.
- Backend: NestJS v11.0.0
- Runtime: Node.js v23.6.0
- Blockchain: Firmachain (Cosmos SDK) - CW721 Standard
- Database: PostgreSQL
- Cache: Redis v7.x
- Package Manager: Yarn 4.6.0
- Metadata Standard: C2PA - JSON-LD Format
Before running this application, ensure you have the following services running:
- PostgreSQL - Required for data persistence
- Redis - Required for caching
yarn installThe application supports three configuration loading modes:
Load from system environment variables.
ENV_FROM=system
DATABASE_HOST=localhost
DATABASE_PASSWORD=your_password
# ... other variablesLoad from a specific file. Defaults to config/.env if ENV_FILE_PATH is not set.
ENV_FROM=file
ENV_FILE_PATH=config/.env.development # OptionalLoad from AWS Secrets Manager (production use).
ENV_FROM=aws
AWS_REGION=ap-southeast-1
AWS_SECRET_NAME=/dev/mintall-nft-cert-api-
Copy the example configuration:
cp config/.env.example config/.env
-
Edit
config/.envwith your database and Redis settings -
Run the application
# Start in debug mode
yarn start:debug
# Start in development mode
yarn start:dev
# Build and run
yarn build
yarn startcd docker
docker-compose up -dNote: Ensure PostgreSQL and Redis containers are on the same Docker network (app-network).
docker network create app-networkGET /healthcheck- Health checkPOST /api/mint/create- Mint NFT certificateGET /api/verification/check- Verify NFT certificate
The project uses GitHub Actions for automated workflows:
- Test Workflow - Runs on PRs and pushes to
develop/staging/main - Semantic Release - Automatically generates version numbers and releases based on commit messages
develop- Development environmentstaging- Staging environment for testingmain- Production environment
src/
├── modules/ # Feature modules
│ ├── entities/
│ ├── mint/
│ └── verification/
├── common/ # Shared utilities
├── shared/ # Shared services (Redis, Firma)
└── config/ # Configuration files
Contributions are welcome! Please ensure all tests pass before submitting a PR:
yarn testMIT License