Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches: [master-v1]
pull_request:
branches: [master-v1]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Typecheck, test & build
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.12

- uses: actions/setup-node@v4
with:
node-version: 20

# `bun install` runs the `prepare` hook, which generates the Prisma clients.
- name: Install dependencies
run: bun install --frozen-lockfile

- name: Typecheck
run: bun run typecheck

- name: Build
run: bun run build
env:
NODE_ENV: production

# Non-blocking for now: `web-ui` carries pre-existing
# @typescript-eslint/no-explicit-any errors. Remove continue-on-error
# once those are cleared so lint becomes a required check.
- name: Lint
run: bun run lint
continue-on-error: true

# Non-blocking until the mock-harness failures in the agent test suite
# are fixed. Remove continue-on-error once the suite is green.
- name: Test
run: bun run test
continue-on-error: true
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

All notable changes to Nucleus Cloud Ops will be documented in this file.
All notable changes to Nucleus Ops will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Expand Down Expand Up @@ -56,7 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.0.0] - 2026-02-28

### Added
- Initial release of Nucleus Cloud Ops
- Initial release of Nucleus Ops
- AWS multi-account management
- Automated resource scheduling (EC2, RDS, ECS)
- AI DevOps agent with LangGraph
Expand Down
71 changes: 68 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ All types of contributions are encouraged and valued. See the [Table of Contents
## Code of Conduct

This project and everyone participating in it is governed by the
[Nucleus Cloud Ops Code of Conduct](CODE_OF_CONDUCT.md).
[Nucleus Ops Code of Conduct](CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior
to the project maintainers.

Expand Down Expand Up @@ -67,7 +67,7 @@ We use GitHub issues to track bugs and errors. If you run into an issue with the

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Nucleus Cloud Ops, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
This section guides you through submitting an enhancement suggestion for Nucleus Ops, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.

#### Before Submitting an Enhancement

Expand All @@ -84,7 +84,7 @@ Enhancement suggestions are tracked as [GitHub issues](/issues).
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives you do not like.
- You may want to include **screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to.
- **Explain why this enhancement would be useful** to most Nucleus Cloud Ops users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
- **Explain why this enhancement would be useful** to most Nucleus Ops users. You may also want to point out the other projects that solved it better and which could serve as inspiration.

### Your First Code Contribution

Expand All @@ -95,6 +95,71 @@ Enhancement suggestions are tracked as [GitHub issues](/issues).
5. Push to the branch (`git push origin feature/amazing-feature`)
6. Open a Pull Request

#### Setting up your development environment

Nucleus Ops is an **Nx 21 + Bun** monorepo. Requires Node.js 20+, Bun, and Docker.

```bash
bun install # single install at the root, hoists to all apps
cp .env.example .env # one root .env, loaded by both apps
docker compose up -d postgres # local PostgreSQL with pgvector
cd apps/web-ui && bun run db:migrate # apply migrations
```

Run the two services (in separate terminals):

```bash
bun run dev # web-ui on http://localhost:3001
bun run dev:workers # pg-boss background workers
```

#### Before opening a pull request

Always invoke tasks through the root scripts so Nx caching and project graph work:

```bash
bun run lint # ESLint across all projects
bun run typecheck # TypeScript, no emit
bun run test # Vitest (web-ui + workers) and Jest (root)
bun run build # verify both apps build
bun run e2e # Playwright E2E (starts the dev server automatically)
```

`bun run verify` runs typecheck, test, and build for **affected** projects only — a
faster pre-push check on a focused change.

> **Note:** the `web-ui` project currently has pre-existing `@typescript-eslint/no-explicit-any`
> errors. Please don't add new ones, but don't feel obliged to fix unrelated ones in your PR.

#### Repository layout

| Path | Contains |
|---|---|
| `apps/web-ui/` | Next.js App Router — pages, API routes, services, LangGraph agents |
| `apps/workers/` | pg-boss background jobs (scheduler, discovery, right-sizing, kb-sync) |
| `apps/web-ui-e2e/` | Playwright end-to-end tests |
| `libs/prisma/` | Prisma schema and migrations, shared by both apps |
| `infra/` | Pulumi stacks (`networking` → `compute`) and CI/CD specs |
| `docs/` | Architecture docs, PRDs, and screenshots |

#### Conventions that will come up in review

- **Data access:** never call Prisma directly from an API route or service — go through the
repository factory (`@/lib/db/repository-factory`).
- **Multi-tenancy:** always scope queries with `getTenantClient(tenantId)`. `$executeRaw` is
*not* intercepted by the tenant extension — scope it manually.
- **Authorization:** every mutating API route calls `authorize(action, Subject)` from
`@/lib/rbac/authorize`.
- **Auditing:** anything that modifies an AWS resource must be logged via `AuditService`.
- **Frontend:** server state uses TanStack Query hooks in `lib/queries/`, forms use React Hook
Form + Zod, toasts import `toast` from `sonner`. Don't hand-roll `useEffect` + `fetch`.
- **UI primitives** in `components/ui/` are shadcn/ui-generated — consume them, don't modify them.
- **Naming:** components are `kebab-case.tsx` exporting `PascalCase` named exports; services are
`kebab-case-service.ts`.

Database schema changes go in `libs/prisma/schema.prisma`, followed by
`bun run db:migrate` in `apps/web-ui` and `bun run db:generate` in **both** apps.

## Styleguides

### Commit Messages
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Nucleus Cloud Ops
Copyright (c) 2024-2026 Kartik Manimuthu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading