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
5 changes: 5 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"enabledPlugins": {
"mongodb@claude-plugins-official": true
}
}
39 changes: 39 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "mean-stack-example",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/mean-stack-example",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "22"
}
},
"customizations": {
"vscode": {
"extensions": [
"mongodb.mongodb-vscode"
]
}
},
"forwardPorts": [
4200,
5300,
27017
],
"portsAttributes": {
"4200": {
"label": "Angular Client"
},
"5300": {
"label": "Express API"
},
"27017": {
"label": "MongoDB"
}
},
"postCreateCommand": "npm install",
"postStartCommand": "bash -lc 'for i in {1..60}; do mongosh --quiet \"$DATABASE_URI\" --eval \"db.hello().isWritablePrimary\" | grep -q true && break; sleep 2; done; npm run seed'",
"remoteEnv": {
"DATABASE_URI": "mongodb://localhost:27017/meanStackExample?appName=mean-stack-example-devcontainer"
}
}
27 changes: 27 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
services:
mongodb:
image: mongodb/mongodb-atlas-local:8.0
healthcheck:
test: ["CMD-SHELL", "mongosh --quiet --eval \"db.hello().isWritablePrimary\" | grep true"]
start_period: 20s
interval: 10s
timeout: 5s
retries: 12
volumes:
- mongodb-data:/data/db
- mongodb-config:/data/configdb

app:
image: mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm
depends_on:
mongodb:
condition: service_healthy
network_mode: service:mongodb
working_dir: /workspaces/mean-stack-example
command: sleep infinity
volumes:
- ..:/workspaces/mean-stack-example:cached

volumes:
mongodb-data:
mongodb-config:
37 changes: 37 additions & 0 deletions .github/repository-metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Repository Metadata

Use the values below in GitHub repository settings for better search and AI discoverability.

## Description

Production-ready MEAN employee management application with Angular, Express, and MongoDB, including schema validation, deterministic seed data, CI smoke checks, and one-click devcontainer setup.

## Topics

Add these topics (lowercase, hyphenated):

- mongodb
- mean-stack
- angular
- express
- nodejs
- typescript
- employee-management
- full-stack
- rest-api
- cypress
- devcontainer
- github-codespaces
- mongodb-schema-validation
- mongodb-seed-data
- github-actions

## Homepage

Leave blank unless you have a deployed URL.

## Social Preview

Recommended text for social cards:

MEAN Employee Management App with MongoDB: schema-validated API, deterministic seed script, CI smoke tests, and Codespaces-ready local development.
87 changes: 87 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: CI

on:
push:
branches: ["main"]
pull_request:

jobs:
build-and-smoke:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
node-version: [20.x, 22.x]

services:
mongodb:
image: mongo:latest
options: >-
--health-cmd "mongosh --eval 'db.adminCommand({ ping: 1 })'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 27017:27017

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Build
env:
DATABASE_URI: mongodb://localhost:27017/
run: npm run build

- name: Server lint tests
env:
DATABASE_URI: mongodb://localhost:27017/
run: npm run test:server

- name: Integration tests
run: npm run test:integration

- name: Seed demo data
env:
DATABASE_URI: mongodb://localhost:27017/meanStackExample?appName=mean-stack-example-ci
run: npm run seed

- name: Start API
env:
DATABASE_URI: mongodb://localhost:27017/meanStackExample?appName=mean-stack-example-ci
PORT: 5300
run: |
npm run start:server > /tmp/server.log 2>&1 &
echo $! > /tmp/server.pid

- name: Wait for API health
run: |
for i in {1..30}; do
if curl -fsS http://localhost:5300/healthcheck >/dev/null; then
echo "API is ready"
exit 0
fi
sleep 1
done
echo "API did not become ready"
cat /tmp/server.log
exit 1

- name: Smoke check employee list endpoint
run: curl -fsS http://localhost:5300/employees

- name: Stop API
if: always()
run: |
if [ -f /tmp/server.pid ]; then
kill "$(cat /tmp/server.pid)" || true
fi
52 changes: 52 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# AGENTS.md

## Build and Test Commands

Use these commands from the repository root:

```bash
npm install
npm run build
npm run test
npm run seed
npm start
```

## Project Structure

- `client/`: Angular frontend
- `server/src/`: Express API, routes, MongoDB connection, schema validation
- `server/scripts/seed.ts`: deterministic sample-data seed script
- `README.md`: setup and architecture guide
- `EDD.md`: MongoDB entity/document schema contract

## Environment Variables and Configuration

Required:

- `DATABASE_URI`: MongoDB connection string used by server and seed script

Optional:

- `PORT`: API port (default: `5300`)

Configuration files:

- `server/.env.example`: example environment values
- `server/.env`: local environment values (create from example)

## MongoDB Skills

Use the official MongoDB agent skills from https://github.com/mongodb/agent-skills
whenever the task is MongoDB-specific and a matching skill exists.

## When To Use EDD.md

Use [EDD.md](./EDD.md) as the source of truth for the MongoDB data model in this repository.

Consult [EDD.md](./EDD.md) before making changes that touch:

- MongoDB collections, document structure, or field names
- Express routes that read or write database records
- Validation, form fields, API payloads, or UI that depend on persisted data
- Schema documentation, Mermaid diagrams, or entity modeling discussions
116 changes: 116 additions & 0 deletions CHECKLIST_REPORT_2026-05-29.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Repo AI Crawlability Checklist Report

Date: 2026-05-29
Repository: mean-stack-example
Checklist Source: MongoDB Developer Repository AI Discoverability Checklist

## Summary

- Pass: 15
- Partial: 2
- Fail: 0
- Pending external (GitHub UI): 2

## Pass 1 — Metadata and Discoverability

### Repository name
Status: PASS
Notes: Name is descriptive and kebab-case.

### Description (GitHub repo setting)
Status: PENDING EXTERNAL
Notes: Repository settings cannot be updated from local files here. Prepared exact text in .github/repository-metadata.md.

### Topics (GitHub repo setting)
Status: PENDING EXTERNAL
Notes: Repository settings cannot be updated from local files here. Prepared exact topics in .github/repository-metadata.md.

### README required sections
Status: PASS
Notes:
- Descriptive H1 present
- Features section present
- Architecture overview + Mermaid present
- Quick Start commands present
- MongoDB features and docs links present
- Additional resources present

### README quality bar
Status: PASS
Notes:
- Opening value proposition present
- Prerequisites and versions present
- Codespaces badge present
- Environment variable table present
- API table present
- Troubleshooting section present

### README command validity (local evidence)
Status: PARTIAL
Notes:
- Verified: backend build and lint checks pass via npm run build:server and npm run test:server
- Not executed in this run: full npm start end-to-end and Angular test due environment/runtime constraints in this audit pass

### EDD.md exists and matches model
Status: PASS
Notes: EDD reflects server/src/database.ts collection, required fields, constraints, and API mapping.

### EDD follows strict edd-skill standard format
Status: PARTIAL
Notes: EDD is structured and accurate, but not generated/validated with edd-skill tooling in this run.

## Pass 2 — Operability and Trust

### AGENTS.md required sections
Status: PASS
Notes:
- Build/test commands present
- Project structure present
- Environment/config present
- MongoDB Skills section present
- EDD usage guidance present

### .claude/settings.json plugin enablement
Status: PASS
Notes: mongodb@claude-plugins-official enabled.

### LICENSE
Status: PASS
Notes: Apache-2.0 license present.

### Seed script
Status: PASS
Notes: Deterministic seed script exists at server/scripts/seed.ts with replace-style behavior (delete then insert).

### Devcontainer and Codespaces
Status: PASS
Notes:
- .devcontainer/devcontainer.json present with Node feature, extension, ports, postCreate, postStart, remoteEnv
- .devcontainer/docker-compose.yml present with pinned Atlas Local image, healthcheck, volumes, and network_mode: service:mongodb
- Codespaces badge present in README

### appName in MongoDB client
Status: PASS
Notes: appName is set in server/src/database.ts.

### CI workflow present
Status: PASS
Notes: Workflow exists at .github/workflows/ci.yml with MongoDB service, build, lint, seed, healthcheck, and smoke endpoint check.

### CI evidence
Status: PASS (local confidence)
Notes: Local backend checks passed. Remote GitHub Actions run status is not queryable from this environment.

## Commands Run During This Audit

- npm run build:server
- npm run test:server

Both completed successfully.

## Remaining Actions to Reach 100%

1. Apply repository Description from .github/repository-metadata.md in GitHub settings.
2. Apply repository Topics from .github/repository-metadata.md in GitHub settings.
3. Optional hardening: validate EDD with edd-skill tooling and update format if required.
4. Optional hardening: run a full clean-machine end-to-end check including npm start and API/UI smoke.
Loading
Loading