Shade is a cutting-edge decentralized payment gateway designed to facilitate seamless, secure, and borderless crypto payments for businesses and individuals. Built on the Stellar blockchain, Shade empowers users with fast, cost-effective, and transparent transactions using smart contracts and layer 2 scalability.
Follow these instructions to get the project up and running on your local machine.
Ensure you have the following installed:
- Node.js (v18 or higher recommended)
- npm
- PostgreSQL
-
Clone the repository:
git clone <repository-url> cd shade-backend
-
Install dependencies:
npm install
-
Configure Environment Variables: Create a
.envfile in the root directory and add your connection string:DATABASE_URL="postgresql://<user>:<password>@localhost:5432/<database>?schema=public"
-
Create postgresql database with docker:
docker run --name postgres -e POSTGRES_PASSWORD=<password> -d postgres:16-alpine
The project uses Prisma for database management.
-
Initialize the database/Generate Client:
npm run prisma:generate
-
Run Migrations: Ensure your PostgreSQL server is running, then run:
npm run prisma:migrate
-
Open Prisma Studio (Optional): To visualize and manage your data:
npm run prisma:studio
To start the server in development mode with hot-reloading:
npm run devTo compile the TypeScript code to JavaScript:
npm run buildTo start the production server:
npm run startnpm run dev: Starts the development server usingtsx.npm run build: Compiles the project usingtsc.npm run prisma:generate: Generates the Prisma Client.npm run prisma:migrate: Runs database migrations in development.npm run prisma:studio: Opens the Prisma GUI.npm run format: Formats code using Prettier.npm run lint: Checks for linting errors.
- Runtime: Node.js
- Language: TypeScript
- Framework: Express (v5)
- Database/ORM: PostgreSQL + Prisma
- Blockchain: Stellar SDK
- Utilities: Prettier, ESLint, Helmet, CORS
Designed with ❤️ for Shade Protocol.