@macedon-technologies/batman
v1.27.0
Published
A baseline architecture template for new projects using Projen. This project provides a standardized foundation that includes both frontend and backend components with authentication.
Readme
Platform Common Projen
A baseline architecture template for new projects using Projen. This project provides a standardized foundation that includes both frontend and backend components with authentication.
Project Intention
This template serves as a starting point for new projects, providing:
- Consistent project structure and configuration
- Pre-configured development tooling
- Integrated authentication system
- Full-stack application foundation
Components Created
The BatmanProject generates:
Frontend
- React Application - Modern React app with TypeScript
- Clerk Authentication - Integrated user authentication and management
- Playwright e2e Testing -
@playwright/test+@clerk/testingdevDeps, atest:e2etask, and a scaffoldedplaywright.config.ts+e2e/starter suite (see the generatedweb/e2e/README.md); disable withe2eTesting: false. The generatedpr-deploy.ymlworkflow also runs this suite against each PR's deployed URL unlesse2eTesting: falseis set.
Backend/Infrastructure
- AWS Infrastructure - CDK-based cloud resources
- API Gateway - RESTful API endpoints
- Lambda Functions - Serverless compute
- Database - Persistent data storage
Usage Examples
Basic Project Creation
Create a .projenrc.ts file in your project root:
import { BatmanProject } from '@macedon-technologies/batman';
const project = new BatmanProject({
name: 'my-new-app',
defaultReleaseBranch: 'main',
});
project.synth();Then run:
npx projenWith Custom Configuration
Create a .projenrc.ts file with additional options:
import { BatmanProject } from '@macedon-technologies/batman';
const project = new BatmanProject({
name: 'my-enterprise-app',
defaultReleaseBranch: 'main',
description: 'Enterprise application with authentication',
authorName: 'Your Name',
authorEmail: '[email protected]',
});
project.synth();Then run:
npx projenDevelopment Workflow
# Install dependencies
yarn install
# Start development server
yarn dev
# Deploy infrastructure
yarn deploy
# Run tests
yarn testSoftwareFactoryFiles (standalone, non-Batman projects)
SoftwareFactoryFiles is independently exported and can be attached to any
projen NodeProject — it does not require BatmanProject or
BootcampProject. It generates the @swamp/software-factory state machine,
the architecture rule registry, the pre-PR attestation gate, the OpenSpec
task-completion gate, and the swamp workflows that wire them together.
import { javascript } from 'projen';
import { SoftwareFactoryFiles } from '@macedon-technologies/batman';
const project = new javascript.NodeProject({
name: 'my-other-project',
defaultReleaseBranch: 'main',
});
new SoftwareFactoryFiles(project, {
repoName: 'my-other-project',
githubOwner: 'my-github-org', // defaults to 'macedon-technologies' if omitted
baseBranch: 'main', // defaults to 'main'
});
project.synth();After running npx projen, follow the printed swamp:bootstrap task to pull
the required swamp extensions and create the project's secrets vault.
