Monorepo for all Java-/Typescript projects of Chaotic-AUR. Includes:
- Part of repository management (.so lib bumps, up-to-date in-depth package data, etc..)
- Router stats
- Package, Router, Metrics API
- Extracting messages from a Telegram news channel to display on the website
- Chaotic-AURs website
- Smaller helper functions / API
To build the project, run the following command:
pnpm build
To run it locally for development purposes, run the following command:
pnpm start:home
pnpm start:be-nx
To run a local CORS-enabled API proxy, change the following constants in the types.ts
file of the shared libs to the
following values:
export const CAUR_BACKEND_URL = "http://localhost:8010/proxy/backend"
export const CAUR_API_URL = "http://localhost:8010/proxy/api"
and run the following command afterward:
pnpm proxy:api
pnpm proxy:be
This will allow using the production API without CORS issues.
- Angular
- NestJs (Fastify, Passport, TypeORM, Swagger)
- Nx (Monorepo management)
- Postgresql
- Redis
- TailwindCSS
- Telegram API
- TypeORM
- Typescript
- AUTH0_AUDIENCE: Auth0 audience to target
- AUTH0_CLIENT_ID: Auth0 client id
- AUTH0_CLIENT_SECRET: Auth0 client secret
- AUTH0_DOMAIN: Auth0 domain
- CAUR_DEPLOY_LOG_ID: Telegram chat id for deploy logs
- CAUR_GITLAB_TOKEN: Gitlab token for pushing to the repository
- CAUR_JWT_SECRET: JWT secret for the backend
- CAUR_NEWS_ID: Telegram chat id for news
- CAUR_TRUST_PROXY: IP address of the proxy, if any
- CAUR_USERS: JSON object with user ids and roles
- NODE_ENV: "production" / any other for dev (will enable TypeORM sync mode)
- PG_DATABASE: Postgres database to use
- PG_HOST: Host name of the Postgres database
- PG_PASSWORD: Postgres password
- PG_USER: Postgres user
- REDIS_PASSWORD: Redis password to connect with the Chaotic Manager (Moleculer microservice)
- REDIS_SSH_HOST: Host of the Redis server, used for SSH port forwarding the Redis instance
- REDIS_SSH_USER: User to use for SSH port forwarding the Redis instance
- TELEGRAM_API_HASH: Telegram API hash
- TELEGRAM_API_ID: Telegram API id
- TELEGRAM_DB_ENCRYPTION_KEY: Encryption key for the Telegram database
Enhance your Nx experience by installing Nx Console for your favorite editor. Nx Console provides an interactive UI to view your projects, run tasks, generate code, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users.
Add Nx plugins to leverage their code generators and automated, inferred tasks.
# Add plugin
pnpm exec nx add @nx/react
# Use code generator
pnpm exec nx generate @nx/react:app demo
# Run development server
pnpm exec nx serve demo
# View project details
pnpm exec nx show project demo --web
Run pnpm exec nx list
to get a list of available plugins and whether they have generators. Then run
pnpm exec nx list <plugin-name>
to see what generators are available.
Learn more about code generators and inferred tasks in the docs.
To execute tasks with Nx use the following syntax:
pnpm exec nx <target> <project> <...options>
You can also run multiple targets:
pnpm exec nx run-many -t <target1> <target2>
..or add -p
to filter specific projects
pnpm exec nx run-many -t <target1> <target2> -p <proj1> <proj2>
Targets can be defined in the package.json
or projects.json
. Learn more
in the docs.