Skip to content
Open
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
8 changes: 7 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ updates:
- '*'
update-types:
- 'minor'
- 'patch'
- 'patch'
ignore:
# Nx's babel tooling (@nx/react, @nx/js) hard-requires Babel 7.x;
# Babel 8 breaks `nx run fe:test` until Nx adds support.
- dependency-name: '@babel/*'
update-types:
- 'version-update:semver-major'
157 changes: 1 addition & 156 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,156 +1 @@
# Admin App - Coding Agent Instructions

## Overview

The Admin App is a centralized management system for Ed-Fi Technology Suite deployments. It provides a unified interface for managing multiple Ed-Fi API instances across on-premises, cloud, or Starting Blocks environments.

## Project Structure

```none
packages/
├── api/ # NestJS backend application
├── fe/ # React frontend application
├── common-ui/ # Shared UI components with Storybook
├── models/ # Shared TypeScript models/types
├── models-server/ # Server-side specific models
└── utils/ # Shared utilities
```

## Key Technologies & Dependencies

### Frontend Stack

- **React** with TypeScript
- **Chakra UI** for component library
- **Vite** for build tooling
- **TanStack Query** for data fetching
- **React Router DOM** for routing
- **React Hook Form** for form management
- **Jotai** for state management

### Backend Stack

- **NestJS** framework
- **TypeORM** for database ORM
- **PostgreSQL** as primary database, or alternatively **Microsoft SQL Server**
- **Express Session** for session management
- **Passport** for authentication

### Development Tools

- **Nx** for monorepo management
- **ESLint** with TypeScript support
- **Prettier** for code formatting
- **Jest** for testing
- **Storybook** for component development

### Key Commands

- `npm run build:fe` - Build frontend
- `npm run build:api` - Build API
- `npm run migrations:generate -- MigrationName` - Generate database migration
- `npm run migrations:run` - Run pending migrations
- `npm run test:api` - Run API tests
- `npm run test:fe` - Run frontend tests
- `npm run lint:check` - Check linting
- `npm run storybook` - Start Storybook

## Development Guidelines

### Code Organization

- **Monorepo**: Use Nx workspace structure with clear package boundaries
- **Shared Code**: Common utilities in `utils/`, UI components in `common-ui/`
- **Models**: Separate client (`models/`) and server (`models-server/`) models
- **TypeScript**: Strict typing throughout the codebase

### Database Management

- **Migrations**: Always generate migrations for schema changes
- **TypeORM**: Use decorators and entities for database modeling
- **Multiple DBs**: Support for both PostgreSQL and MSSQL

### Authentication & Security

- **OIDC Integration**: Configurable identity providers
- **Session Management**: Express sessions with database storage
- **Machine Users**: Support for M2M authentication via OAuth
- **Encryption**: Sensitive data encrypted at rest

### Testing Strategy

- **Unit Tests**: Jest for both frontend and backend
- **E2E Tests**: Cypress for integration testing
- **Storybook**: Component testing and documentation
- **Test Coverage**: Maintain good coverage across packages

### Code Quality

- **REQUIRED**: Obey the `.editorconfig` file settings at all times. The project uses:
- UTF-8 character encoding
- LF line endings
- 2-space indentation
- Spaces for indentation style
- Final newlines required
- Trailing whitespace must be trimmed
- **ESLint**: Enforce coding standards with TypeScript rules
- **Prettier**: Consistent code formatting
- **Semantic Release**: Automated versioning based on commit messages
- **PR Guidelines**: Use semantic commit messages (feat:, fix:, docs:, etc.)
- **REQUIRED**: Execute `npm run build` before submitting any changes and correct any build errors

## Common Development Tasks

### Adding New Features

1. **Plan**: Break down into smaller concepts
2. **Models**: Define TypeScript interfaces in appropriate packages
3. **Database**: Create migrations if schema changes needed
4. **Backend**: Implement NestJS controllers, services, DTOs
5. **Frontend**: Create React components, hooks, and pages
6. **Tests**: Add unit and integration tests
7. **Documentation**: Update relevant docs

### Working with Database

```bash
# Generate migration
npm run migrations:generate -- AddNewFeature

# Run migrations on PostgreSQL
npm run migrations:run

# Revert last migration
npm run migrations:revert
```

### Component Development

```bash
# Start Storybook
npm run storybook

# Build Storybook
npm run build-storybook:common-ui
```

## Contributing

### Commit Message Format

Use semantic commit messages for automated versioning:

- `feature:` - New features (minor version bump)
- `fix:` - Bug fixes (patch version bump)
- `docs:` - Documentation updates (no version bump)
- `refactor:` - Code improvements (patch version bump)
- `test:` - Test updates (no version bump)
- `chore:` - Maintenance tasks (no version bump)

### Pull Request Process

1. Create feature branch from `main`
2. Use semantic commit messages
3. Include unit tests for new functionality
4. Update documentation as needed
5. Ensure all checks pass
Read @CLAUDE.md
161 changes: 161 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# Admin App - Coding Agent Instructions

## Overview

The Admin App is a centralized management system for Ed-Fi Technology Suite deployments. It provides a unified interface for managing multiple Ed-Fi API instances across on-premises, cloud, or Starting Blocks environments.

## Project Structure

```none
packages/
├── api/ # NestJS backend application
├── fe/ # React frontend application
├── common-ui/ # Shared UI components with Storybook
├── models/ # Shared TypeScript models/types
├── models-server/ # Server-side specific models
└── utils/ # Shared utilities
```

## Key Technologies & Dependencies

### Frontend Stack

- **React** with TypeScript
- **Chakra UI** for component library
- **Vite** for build tooling
- **TanStack Query** for data fetching
- **React Router DOM** for routing
- **React Hook Form** for form management
- **Jotai** for state management

### Backend Stack

- **NestJS** framework
- **TypeORM** for database ORM
- **PostgreSQL** as primary database, or alternatively **Microsoft SQL Server**
- **Express Session** for session management
- **Passport** for authentication

### Development Tools

- **Nx** for monorepo management
- **ESLint** with TypeScript support
- **Prettier** for code formatting
- **Jest** for testing
- **Storybook** for component development
- **Node.js >=24.0.0** required (see `.nvmrc` for the exact pinned version)

### Key Commands

- `npm run build:fe` - Build frontend
- `npm run build:api` - Build API
- `npm run migrations:generate -- MigrationName` - Generate database migration
- `npm run migrations:run` - Run pending migrations
- `npm run migrations:run:mssql` - Run pending migrations against MSSQL
- `npm run test:api` - Run API tests
- `npm run test:fe` - Run frontend tests
- `npm run test:e2e:bdd` - Run Playwright/Gherkin E2E tests
- `npm run lint:check` - Check linting
- `npm run storybook` - Start Storybook

## Development Guidelines

### Code Organization

- **Monorepo**: Use Nx workspace structure with clear package boundaries
- **Shared Code**: Common utilities in `utils/`, UI components in `common-ui/`
- **Models**: Separate client (`models/`) and server (`models-server/`) models
- **TypeScript**: Strict typing throughout the codebase

### Database Management

- **Migrations**: Always generate migrations for schema changes
- **TypeORM**: Use decorators and entities for database modeling
- **Multiple DBs**: Support for both PostgreSQL and MSSQL

### Authentication & Security

- **OIDC Integration**: Configurable identity providers
- **Session Management**: Express sessions with database storage
- **Machine Users**: Support for M2M authentication via OAuth
- **Encryption**: Sensitive data encrypted at rest

### Testing Strategy

- **Unit Tests**: Jest for both frontend and backend
- **E2E Tests**: Playwright with Gherkin/BDD feature files (`tests/e2e/**/*.feature`)
- **Storybook**: Component testing and documentation
- **Test Coverage**: Maintain good coverage across packages

### Code Quality

- **REQUIRED**: Obey the `.editorconfig` file settings at all times. The project uses:
- UTF-8 character encoding
- 2-space indentation
- Spaces for indentation style
- Final newlines required
- Trailing whitespace must be trimmed
- **REQUIRED**: LF line endings are enforced repo-wide via `.gitattributes` (`* text=auto eol=lf`)
- **ESLint**: Enforce coding standards with TypeScript rules
- **Prettier**: Consistent code formatting
- **Semantic Release**: Automated versioning based on commit messages
- **PR Guidelines**: Use semantic commit messages (feat:, fix:, docs:, etc.)
- **REQUIRED**: Execute `npm run build` before submitting any changes and correct any build errors

## Common Development Tasks

### Adding New Features

1. **Plan**: Break down into smaller concepts
2. **Models**: Define TypeScript interfaces in appropriate packages
3. **Database**: Create migrations if schema changes needed
4. **Backend**: Implement NestJS controllers, services, DTOs
5. **Frontend**: Create React components, hooks, and pages
6. **Tests**: Add unit and integration tests
7. **Documentation**: Update relevant docs

### Working with Database

```bash
# Generate migration
Comment thread
roberthunterjr marked this conversation as resolved.
npm run migrations:generate -- AddNewFeature

# Run migrations on PostgreSQL
npm run migrations:run

# Revert last migration
npm run migrations:revert
```

### Component Development

```bash
# Start Storybook
npm run storybook

# Build Storybook
npm run build-storybook:common-ui
```

## Contributing

### Commit Message Format

Use semantic commit messages for automated versioning (see `release.config.mjs`):

- `feat:` / `feature:` - New features (minor version bump)
- `fix:` - Bug fixes (patch version bump)
- `docs:` - Documentation updates (no version bump)
- `refactor:` - Code improvements (patch version bump)
- `perf:` / `performance:` - Performance improvements (patch version bump)
- `test:` - Test updates (no version bump)
- `chore:` - Maintenance tasks (no version bump)
- `build:` / `ci:` - Build system or CI changes (no version bump)

### Pull Request Process

1. Create feature branch from `main`
2. Use semantic commit messages
3. Include unit tests for new functionality
4. Update documentation as needed
5. Ensure all checks pass
12 changes: 5 additions & 7 deletions compose/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ POPULATED_SQL_PATH=/var/opt/pgsql/data/sql-backups/EdFi.Ods.Populated.Template.s
EDFI_ODS_DATASET=minimal
POSTGRES_PORT=5432

ODS_API_TAG_7X=v7.3@sha256:cd359af95d9cdb68753c67037b9c89f2103c0f706db34bba291321b396e16869
ODS_API_TAG_7X=v7.3.2@sha256:64ec898075da58824ab8a0f91f445abbf3cc8c225bfc7c69ed34fe84d6ef230f

# ... "pre" below brings in the latest pre-release version of the Admin API 2.4
ADMIN_DB_TAG_7X=pre
ADMIN_API_TAG_7X=pre
#ADMIN_API_TAG_7X=pre@sha256:460c8940527327e916662ad90ed65c72d6f76aeea809607ca1c096f99f224af4
#ADMIN_DB_TAG_7X=v2.2.1@sha256:1d69fa553fcd3e1d27a35485e2c0f428b95cf1a642dd019844a81af4def01714
#ADMIN_API_TAG_7X=v2.2.1@sha256:329e3d31b90e03e18ded7a586e42d54ab934ae0a252036d36c0fe28bd66dc3c7
ADMIN_DB_TAG_7X=v2.3.2@sha256:5c912e7e382bdb8f6f15e83bc0243e54a5120b6fc0ec0da7b508d96144ec328f
#ADMIN_API_TAG_7X=v2.3.2@sha256:59b5816e1d39cad77bb1dbae0536940efd5a20f2cb35c9e496db70d147c1333f
ADMIN_API_TAG_7X=pre # Use `pre` for the latest development version
Comment thread
stephenfuqua marked this conversation as resolved.

ODS_V7_ADMIN_V2_MULTI_API_VIRTUAL_NAME=odsv7-adminv2-multi-api
ODS_V7_ADMIN_V2_MULTI_ADMIN_API_VIRTUAL_NAME=odsv7-adminv2-multi-adminapi
Expand Down Expand Up @@ -161,4 +159,4 @@ CERT_BRUNO_ON_DOWNLOAD_ERROR='warning' # error | warning.
## PostgreSQL (DB_ENGINE=pgsql):
DB_SECRET_VALUE={"DB_HOST":"edfiadminapp-postgres","DB_PORT":5432,"DB_USERNAME":"postgres","DB_PASSWORD":"postgres","DB_DATABASE":"sbaa"}
## SQL Server (DB_ENGINE=mssql):
# DB_SECRET_VALUE={"MSSQL_DB_HOST":"edfiadminapp-mssql","MSSQL_DB_PORT":1433,"MSSQL_DB_USERNAME":"sa","MSSQL_DB_PASSWORD":"YourStrong!Passw0rd","MSSQL_DB_DATABASE":"sbaa"}
# DB_SECRET_VALUE={"MSSQL_DB_HOST":"edfiadminapp-mssql","MSSQL_DB_PORT":1433,"MSSQL_DB_USERNAME":"sa","MSSQL_DB_PASSWORD":"YourStrong!Passw0rd","MSSQL_DB_DATABASE":"sbaa"}
13 changes: 8 additions & 5 deletions compose/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,18 @@ repo. Configure the following in your `.env` file:
Typical source: Azure Artifacts (NuGet packages for Ed-Fi ODS templates). For
example:

- Minimal template:
<https://dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_artifacts/feed/EdFi/NuGet/EdFi.Suite3.Ods.Minimal.Template.PostgreSQL.Standard.4.0.0/overview/7.3.20068>
- Populated template:
<https://dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_artifacts/feed/EdFi/NuGet/EdFi.Suite3.Ods.Populated.Template.PostgreSQL.Standard.4.0.0/overview/7.3.20068>
- [Minimal template for ODS/API 7.3.2, Data Standard 4](https://dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_artifacts/feed/EdFi/NuGet/EdFi.Suite3.Ods.Minimal.Template.PostgreSQL.Standard.4.0.0/overview/7.3.20068)
- [Populated template for ODS/API 7.3.2, Data Standard 4](https://dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_artifacts/feed/EdFi/NuGet/EdFi.Suite3.Ods.Populated.Template.PostgreSQL.Standard.4.0.0/overview/7.3.20068)
- [Minimal template for ODS/API 7.3.2, Data Standard 5.2](https://dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_artifacts/feed/EdFi/NuGet/EdFi.Suite3.Ods.Minimal.Template.PostgreSQL.Standard.5.2.0/overview/7.3.20057)
- [Populated template for ODS/API 7.3.2, Data Standard 5.2](https://dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_artifacts/feed/EdFi/NuGet/EdFi.Suite3.Ods.Populated.Template.PostgreSQL.Standard.5.2.0/overview/7.3.20057)

> [!NOTE]
> Data Standard and package version may vary by environment/release. Download
> the matching Minimal and Populated template versions for your target stack,
> then place both `.sql` files in your `SQL_BACKUPS_FOLDER`.
> open the downloaded file as a Zip file, then place both `.sql` files in your
> `SQL_BACKUPS_FOLDER`.

Set the following environment variables:

- **`SQL_BACKUPS_FOLDER`**: host path to a folder containing
`EdFi.Ods.Minimal.Template.sql` and `EdFi.Ods.Populated.Template.sql`. This
Expand Down
5 changes: 5 additions & 0 deletions compose/settings/appsettings.v2.dockertemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
}
}
},
"_FeatureManagement":"Use `FeatureManagement:MultiTenancy` for ODS/API 7.3.2",
"FeatureManagement": {
"MultiTenancy": true
},
"_ApiSettings":"Use `Features:11:IsEnabled` when switching to ODS/API 7.3.1",
"ApiSettings": {
"Features:11:IsEnabled": true
},
Expand Down
Loading
Loading