- Node v20 or higher
- PNPM
- Docker
Tip
If you don't have PNPM installed, you can install it using corepack:
corepack enable
corepack prepare pnpm@latest --activateClone the repo and install dependencies:
git clone [email protected]:pubkeyapp/deanslist-platform.git
cd deanslist-platform
pnpm installYou can run the automatic setup script to create the .env file, test the setup and push the database schema.
pnpm setupCopy the .env.example file to .env and fill in the missing values.
cp .env.example .envCreate the JWT_SECRET using the command below, and update it in .env file:
openssl rand -hex 32Get your Solana wallet and update the AUTH_SOLANA_ADMIN_IDS in .env file.
Once you start the app, if you connect with the same wallet id you will have admin rights.
You will need to start the database before starting the backend.
pnpm dev:servicesIf you start from scratch, you will need to push the database schema to the database.
pnpm prisma db pushAlso, after each change to the schema in prisma/schema.prisma, you will need to run the above command again.
pnpm dev:apipnpm dev:webpnpm dev:sdkYou can use the following commands to generate new models, API features, web features and SDK types.
The following command will generate a new model in prisma/schema.prisma.
You will need to run pnpm prisma db push to push the schema to the database.
pnpm nx g prisma-model companyOutput:
> NX Generating @deanslist-platform/tools:prisma-model
UPDATE prisma/schema.prismaThe following command will generate a new API feature in libs/api/company/*.
You will need to restart the API server to make sure it picks up the new libraries.
pnpm nx g api-feature companyOutput:
> NX Generating @deanslist-platform/tools:api-feature
CREATE libs/api/company/data-access/...
CREATE libs/api/company/feature/...
UPDATE libs/api/core/feature/src/lib/api-core-feature.module.ts
CREATE libs/sdk/src/graphql/feature-company.graphql
CREATE apps/api-e2e/src/api/api-company-feature.spec.tsThe following command will generate a new web feature in libs/web/company/*.
You will need to restart the web server to make sure it picks up the new libraries.
pnpm nx g web-feature companyOutput:
> NX Generating @deanslist-platform/tools:web-feature
CREATE libs/web/company/data-access/...
CREATE libs/web/company/feature/...
CREATE libs/web/company/ui/...
UPDATE libs/web/shell/feature/src/lib/shell-admin-routes.tsx
UPDATE tsconfig.base.json