A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
$ yarn install# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:covWhen you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the deployment documentation for more information.
If you are looking for a cloud-based platform to deploy your NestJS application, check out Mau, our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
$ yarn install -g @nestjs/mau
$ mau deployWith Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
Check out a few resources that may come in handy when working with NestJS:
- Visit the NestJS Documentation to learn more about the framework.
- For questions and support, please visit our Discord channel.
- To dive deeper and get more hands-on experience, check out our official video courses.
- Deploy your application to AWS with the help of NestJS Mau in just a few clicks.
- Visualize your application graph and interact with the NestJS application in real-time using NestJS Devtools.
- Need help with your project (part-time to full-time)? Check out our official enterprise support.
- To stay in the loop and get updates, follow us on X and LinkedIn.
- Looking for a job, or have a job to offer? Check out our official Jobs board.
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.
- Set environment variables:
export DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DBNAME?schema=public"
export JWT_SECRET="replace-with-strong-secret"- Generate Prisma client and run migrations:
yarn prisma:generate
yarn prisma:migrate --name init- Start the server:
yarn start:dev- POST
POST /auth/request-message- body:
{ "address": "0x..." } - returns:
{ message, expiresAt }
- body:
- POST
POST /auth/verify- body:
{ "address": "0x...", "signature": "0x..." } - returns:
{ accessToken, expiresInSeconds, address }
- body:
- GET
GET /auth/mewithAuthorization: Bearer <token>
The message is deterministic per nonce: Sign in to PDoge\n\nNonce: <nonce>. Clients should sign exactly this string with their wallet (e.g., MetaMask) and submit the signature to /auth/verify.
POST /token-analysesaccepts the raw LLM response plus optional metadata so we can cache trending contract reviews.- Minimum payload:
{
"tokenAddress": "0x1234...",
"tokenName": "PolyDoge",
"tokenSymbol": "PDOGE",
"content": "Full markdown/text response from the LLM",
"verdictLine": "Final verdict snippet",
"metrics": [{ "key": "liq", "label": "Liquidity", "value": "$14M" }],
"vulnerabilities": [{ "severity": 8.5, "text": "Severity: 8/10 – Proxy not upgrade-safe" }],
"aiModel": "gpt-4.1",
"analysisType": "contract",
"trendScore": 0.82,
"trendingUntil": "2025-11-17T02:30:00.000Z",
"isTrending": true,
"metadata": { "promptVersion": "v6" }
}GET /token-analyses/token/:addressreturns the latest cached analysis for a contract.GET /token-analyses/trending?limit=10surfaces the most recent trending cache entries that are eligible for reuse by the UI or bots.
All responses follow the same structure, returning stored metrics, verdict lines, parsed vulnerabilities, and trend metadata while hiding the internal content hash.
The backend now keeps a background worker alive that tweets one cached analysis every ~2 hours (interval is configurable). Tweets reuse the same copy as the front-end share button: header banner, token metadata, emoji-coded severity lines capped at 280 characters, and automatic threading when a single analysis produces multiple findings.
Configure via environment variables:
| Variable | Description |
|---|---|
TWITTER_CONSUMER_KEY |
API Key from X developer portal |
TWITTER_CONSUMER_SECRET |
API Key secret |
TWITTER_ACCESS_TOKEN |
OAuth1.0a access token with write scope |
TWITTER_ACCESS_SECRET |
OAuth1.0a access token secret |
TWITTER_AUTOPOST |
Set to false to disable the cron without removing creds |
TWITTER_POST_INTERVAL_MS |
Optional override for the 2h cadence |
TWITTER_INITIAL_DELAY_MS |
Optional delay before the first automatic post |
The autoposter only uses analyses that are marked trending, have not been tweeted in the last 12 hours, and still contain meaningful content. Each successful run updates lastTweetedAt so the same contract is not spammed repeatedly. Errors are logged but never crash the API server.