Before starting the project, make sure you have the following tools installed:
- Node.js (version 18+ recommended)
- NestJS CLI (
npm install -g @nestjs/cli) - Docker (for PostgreSQL database)
- PostgreSQL (if you don't want to use Docker)
git clone https://github.com/YOUR-USER/citizen-of-arcanis-backend.git
cd citizen-of-arcanis-backendnpm installCreate a .env file in the root of the project with the following content:
PORT=3000
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASS=password
DB_NAME=coa_database
JWT_SECRET=supersecretkey
CONTRACT_ADDRESS=0x040811bb6636316c9f1809e2898285976d2a0db66e33703defbfb0c7572b87ad
WALLET_ADDRESS=0x066EE9d5F6791270d7cD1314ddB9fc8f7EdCb59E2847e2b13D57A06e7c988D63
WALLET_PRIVATE_KEY=0x0363c39930af5bfd1890d94963a503fec02cc4965080517dc2888c1671a5e25a
STARKNET_NETWORK=sepolia-alpha
If you use Docker, simply run:
docker-compose -d
npm run start:devstart npm run: devcitizen-of-arcanis-backend/
βββ src/
β βββ modules/
β β βββ auth/ # Authentication module (JWT)
β β βββ users/ # User management
β β βββ Marketplace/ # NFT management and economy
β β βββ game/ # Unity synchronization
β βββ common/ # Utilities and middlewares
β βββ main.ts # Entry point
βββ .env # Variables environment
βββ package.json # dependencies
βββ tsconfig.json # TypeScript configuration
βββ docker-compose.yml # Database and deployment