This is a TypeScript playground for experimenting with Flatfile listeners. This project includes
a simple listener that can easily be extended to include your own custom logic. The project is configured to be used in
multiple environments by selecting the appropriate environment. This can be modified to your use case by adding or removing
.env.*
files and updating the package.json
scripts.
src/
├── index.ts # Main listener configuration
└── blueprints/
├── index.ts # Blueprint exports
└── sheets/
├── contacts.ts # Contact sheet configuration
└── [sheet-name].ts # Another sheet configuration
- Bun runtime
- Flatfile account and API credentials
- Clone the repository:
git clone https://github.com/carlbrugger/flatfile-headless-playground.git
cd flatfile-headless-playground
- Install dependencies:
bun install
- Configure environment variables:
# Create environment files for each environment
cp .env.example .env.local
cp .env.example .env.staging
cp .env.example .env.prod
- Fill in your Flatfile credentials in the appropriate
.env
files.
bun run dev:local
bun run dev:staging
bun run dev:prod
# Deploy to default agent
bun run deploy:prod
# Deploy to specific agent
bun run deploy:prod -- -s <agent-name>
# Local environment
bun run deploy:local
# Staging environment
bun run deploy:staging
# Production environment
bun run deploy:prod
bun run dev
- Start development serverbun run dev:local
- Start with local environmentbun run dev:staging
- Start with staging environmentbun run dev:prod
- Start with production environment
bun run deploy
- Deploy to Flatfile platformbun run deploy:local
- Deploy with local environmentbun run deploy:staging
- Deploy with staging environmentbun run deploy:prod
- Deploy with production environment
bun run list
- List deployed agentsbun run delete
- Delete deployed agent
bun run check:all
- Run all checks (format, lint, types)bun run check:format
- Check code formattingbun run check:lint
- Run lintingbun run check:types
- Type checkingbun run fix:all
- Auto-fix all issuesbun run fix:format
- Auto-fix formattingbun run fix:lint
- Auto-fix linting issues
ncu
- Check for updates to dependenciesncu -u
- Update dependencies to the latest versionsbun install
- Install the updated dependencies
@flatfile/api
- Flatfile API client@flatfile/listener
- Event listener framework@flatfile/plugin-record-hook
- Data validation plugin@flatfile/plugin-space-configure
- Space configuration plugin@flatfile/plugin-xml-extractor
- XML processing pluginflatfile
- CLI tool
@biomejs/biome
- Code formatting and linting@dotenvx/dotenvx
- Environment variable managementtypescript
- TypeScript compiler@total-typescript/tsconfig
- TypeScript configuration
- Fork the repository
- Create a feature branch
- Make your changes
- Run
bun run check:all
to ensure code quality - Submit a pull request
ISC License - see package.json for details
Carl Brugger