This project was heavily generated by Windsurf AI. I was wondering how far I can go with just AI prompts and trying not to write anything by myself. I started with the prompt - something like "I want to create a monorepo with Nx.dev, I want to use NextJS for FE and BFF, I want to use Vitest and Playwrite for testing, storybook with shadcn/ui, I want to use bun instead of npm or pnpm" - maybe not exact prompt, but close.
Then I realised that new AIs and VS Code forks appears every day or two, and I need a way to share my ideas and vision with other AIs or humans who might be interested in the project or who might be able to help. So I throw into AI some architecture ideas / patterns / tools and best practices and asked to put them into /docs section in .md files - so other AIs or humans might read, understand and follow them. I also asked AI to update docs when I make changes and vice versa - when I manually update .md files - this means we need to update the codebase. So far this strategy works pretty well, and highly effective.
This repository contains the source code for the ACME project. It's a blueprint / playground for a common projects.
It suppose to have some core features, pretty much any project should have:
- auth
- roles:user / customer / admin
- admin dashboard
- user dashboard
- some basic CRUD operations (basic API patterns, search, filtering, sorting, pagination, etc)
- some UI components
- send emails / push notifications
- upload files / images
- messanger (text chat, voice chat, video chat, AI chat, group chat, file sharing, etc)
Might be extended to have more specific features like:
- blog
- forum
- knowledge base / FAQ / support
- social media / networking
- e-commerce / app store / online store / marketplace
- AI / chatbot
- job board / recruiting / freelance
- dating app
- events / calendar
- media (news aggregator, music, radio, podcasts, video, games, etc.)
- web scraping / crawling / scraping
- analytics / monitoring
- SaaS / CRM / ORM
- crowdfunding / venture capital / startup
- internal tools for business operations and automation
- etc.
/acme
โโโ .windsurfrules # AI guidelines and instructions for Windsurf
โโโ .cursorrules # Symlink to .windsurfrules for Cursor
โโโ .github
โ โโโ workflows # GitHub Actions workflows
โ โโโ PULL_REQUEST_TEMPLATE
โ โโโ copilot-instructions.md # Symlink to .windsurfrules for GitHub Copilot
โ
โโโ /apps # Application-specific code
โ โโโ /web # Next.js web application (including admin)
โ โโโ /mobile # Expo mobile application
โ โโโ /desktop # Nextron desktop application
โ โโโ /services # Backend services (Hono/Elysia)
โ โโโ /chatbots # Various chatbot implementations
โ
โโโ /packages # Shared packages
โ โโโ /ui # UI components and design system
โ โโโ /config # Shared configuration
โ โโโ /types # Shared TypeScript types
โ
โโโ /libs # Feature libraries
โ โโโ /auth # Authentication and authorization
โ โโโ /user # User management
โ โโโ /blog # Blog functionality
โ โโโ /chat # Messaging system
โ โโโ /media # Media handling
โ
โโโ /docs # Project documentation
โ โโโ /architecture # Architecture diagrams and decisions
โ โโโ /development # Development guidelines
โ โโโ /deployment # Deployment procedures
โ โโโ /security # Security guidelines
โ โโโ /testing # Testing strategies
โ
โโโ /templates # Project templates
โ โโโ /ui # UI component templates
โ โ โโโ /component # Basic component template
โ โ โโโ [name].tsx
โ โ โโโ [name].stories.tsx
โ โ โโโ [name].spec.tsx
โ โ โโโ README.md
โ โ โโโ index.ts
โ โ
โ โโโ /feature # Feature implementation templates
โ โโโ /[name] # Feature template structure
โ โโโ /docs # Feature documentation
โ โ โโโ REQUIREMENTS.md
โ โ โโโ TECHNICAL.md
โ โ โโโ TESTING.md
โ โโโ /design # Design assets
โ โ โโโ /wireframes
โ โ โโโ /mockups
โ โ โโโ /user-flows
โ โโโ /src # Implementation
โ โโโ README.md
โ
โโโ /tools # Internal tooling
โ โโโ /scripts # Utility scripts
โ โโโ /generators # Code generators
โ โโโ /helpers # Helper utilities
โ
โโโ /.husky # Git hooks for code quality and security
โ โโโ /pre-commit # Pre-commit validation and checks
โ โโโ /commit-msg # Commit message validation
โ โโโ /post-checkout # Environment and dependency management
โ
โโโ /specs # Detailed specifications
โ โโโ /requirements # Feature requirements
โ โโโ /ui-ux # UI/UX specifications
โ โโโ /technical # Technical specifications
โ โโโ /testing # Test specifications
โ
โโโ /ideas # Project ideas and proposals
โ โโโ /features # Feature ideas
โ โโโ /improvements # Improvement proposals
โ โโโ /experiments # Experimental concepts
โ
โโโ /tmp # Temporary files and drafts
This project implements comprehensive security measures:
- Dependabot: Automated dependency updates and security patches
- CodeQL Analysis: Continuous code scanning for vulnerabilities
- Security Headers: Robust HTTP security headers implementation
- Rate Limiting: API protection against abuse
For detailed security information and vulnerability reporting guidelines, see our Security Documentation.
The UI component template provides a standardized structure for creating new components:
/templates/ui/component
โโโ [name].tsx # Component implementation
โโโ [name].stories.tsx # Storybook stories
โโโ [name].spec.tsx # Component tests
โโโ README.md # Component documentation
โโโ index.ts # Public exports
The feature template includes everything needed for full feature implementation:
/templates/feature/[name]
โโโ /docs
โ โโโ REQUIREMENTS.md # Customer requirements
โ โโโ TECHNICAL.md # Technical specifications
โ โโโ TESTING.md # Testing strategy
โโโ /design
โ โโโ /wireframes # Low-fidelity designs
โ โโโ /mockups # High-fidelity designs
โ โโโ /user-flows # User flow diagrams
โโโ /src # Implementation
โโโ README.md # Feature overview
The ideas directory is organized to capture various types of proposals:
/ideas
โโโ /features # New feature proposals
โ โโโ FEATURE_1.md
โ โโโ FEATURE_2.md
โโโ /improvements # Improvement suggestions
โ โโโ IMPROVEMENT_1.md
โ โโโ IMPROVEMENT_2.md
โโโ /experiments # Experimental concepts
โโโ EXPERIMENT_1.md
โโโ EXPERIMENT_2.md
We provide CLI tools to scaffold new components and features:
# Create a new UI component
bun run create:component Button
# Create a new feature
bun run create:feature UserAuthentication
# Generate implementation from idea
bun run implement:idea features/FEATURE_1.mdThese commands will:
- Copy the appropriate template
- Replace placeholders with actual names
- Prompt for additional information
- Use AI to help generate initial content
- Set up the required file structure
-
Authentication & Authorization
- Multi-factor authentication
- Role-based access control
- OAuth2 integration
- JWT implementation
-
User Management
- User profiles
- Role management (user/customer/admin)
- Account settings
- Preferences management
-
Dashboard Systems
- Admin dashboard
- User dashboard
- Analytics and reporting
- Activity monitoring
-
API Features
- RESTful and GraphQL endpoints
- Advanced CRUD operations
- Search functionality
- Filtering and sorting
- Pagination
- Rate limiting
- Caching
-
UI Components
- shadcn/ui integration
- Responsive design
- Theme customization
- Accessibility compliance
-
Communication
- Email notifications
- Push notifications
- Real-time updates
- Webhook integrations
-
File Management
- File upload/download
- Image processing
- Document handling
- Cloud storage integration
-
Messaging System
- Text chat
- Voice chat
- Video chat
- AI chat integration
- Group chat
- File sharing
- Message encryption
-
Security Infrastructure
- Automated security scanning with Trivy
- Secret detection with Gitleaks
- Dependency vulnerability scanning
- Pre-commit security hooks
- Environment variable protection
- See Security Documentation for details
-
Content Management
- Blog system
- Forum functionality
- Knowledge base
- FAQ management
- Support ticketing
-
Social Features
- User profiles
- Social connections
- Activity feeds
- Content sharing
-
E-commerce
- Product management
- Shopping cart
- Payment processing
- Order management
- Inventory tracking
-
AI Integration
- Chatbots
- Content generation
- Recommendation systems
- Automated moderation
-
Business Tools
- Job board
- Recruiting system
- Freelance marketplace
- Project management
-
Media Features
- News aggregation
- Podcast system
- Video streaming
- Music playback
- Gaming integration
-
Data & Analytics
- Web scraping
- Data visualization
- Performance monitoring
- User analytics
-
Business Operations
- CRM functionality
- SaaS features
- Automation tools
- Workflow management
This project uses a shared set of AI guidelines stored in .windsurfrules. To ensure consistent AI assistance across different tools, we maintain symlinks to this file:
.cursorrules- Symlink for Cursor AI.github/copilot-instructions.md- Symlink for GitHub Copilot
These files contain shared instructions, best practices, and conventions that all AI assistants should follow when helping with this project. This ensures consistency in code generation, suggestions, and automated tasks across different AI tools.
For detailed documentation, please refer to:
The project uses Bun as the package manager. Here are the key commands:
# Install dependencies in all packages
bun run install:all
# Clean up dependencies and artifacts
bun run clean:all # Clean with confirmation
bun run clean:all --force # Clean without confirmation
bun run clean:all --dry-run # Show what would be cleanedWe use a custom docs-manager tool to maintain documentation:
# Format documentation
bun run docs:format # Format with preview
bun run docs:format:check # Check formatting
bun run docs:format:fix # Fix formatting issues
bun run docs:maintain # Run all documentation maintenance tasksThese tools are located in the /tools directory:
cleanup- Manages project cleanup (dependencies, artifacts, etc.)docs-manager- Handles documentation formatting and maintenancedocs-fetcher- Fetches and processes documentation
All build outputs, test results, and generated files are organized under the artifacts directory in the root:
artifacts/
โโโ apps/
โ โโโ web/
โ โ โโโ dist/ # Production build
โ โ โโโ dev/ # Development build
โ โ โโโ coverage/ # Test coverage
โ โ โโโ storybook/ # Storybook static build
โ โ โโโ lint/ # ESLint output
โ โโโ web-e2e/
โ โโโ playwright/ # Playwright test results
โ โ โโโ html-report/
โ โ โโโ results.xml
โ โโโ lint/ # ESLint output
โ โโโ types/ # TypeScript checking output
โโโ packages/ # (for future package outputs)
This structure ensures:
- All generated files are in one centralized location
- Clear separation between different types of outputs
- Easy cleanup of all generated files
- Prevention of source directory clutter
- Consistent structure across all projects
- Better CI/CD integration with predictable paths
The project includes a cleanup script to manage generated files and caches:
# Basic cleanup
bun run cleanup
# Cleanup and reinstall dependencies
bun run cleanup --reinstallThe cleanup script handles:
- Build outputs (
artifactsdirectory) - Build caches (
.next,dist, etc.) - Test coverage directories
- Node modules and package manager files
- Nx cache
- Any stray output directories
- Runtime & Package Management: Bun
- Frontend: Next.js, TypeScript, Tailwind CSS, shadcn/ui
- Testing: Vitest, Playwright
- UI Development: Storybook
- Monorepo Management: Nx.dev
- Version Control: Git
- CI/CD: GitHub Actions
- Node.js >= 20.0.0
- Bun >= 1.0.0
- Git
# Clone the repository
git clone https://github.com/yourusername/acme.git
cd acme
# Install dependencies
bun install
# Set up security tools
bun run security:setup
# Start development server
bun run dev- Nx Console for VS Code
- ESLint + Prettier
- Husky for Git hooks
- Security scanning tools (Trivy, Gitleaks)
Describe how to use the project here.
For information about contributing to this project, please see our contributing guide.
This project is licensed under the MIT License - see the LICENSE file for details.