- ⚡ Quick Start
- 🐳 Docker
- 👨💻 Developers
- 🌱 Env Variables
- 📖 Documentation
- 🌐 Self Host
- ☁️ Flowise Cloud
- 🙋 Support
- 🙌 Contributing
- 📄 License
There are two main ways to get started with TheAnswer: local development setup and deployment on Render.
-
Clone the repository:
# Recommended: Clone with submodules included git clone --recursive https://github.com/the-answerai/theanswer.git cd theanswer
- Clone the Flowise project
- Go to
dockerfolder at the root of the project - Copy
.env.examplefile, paste it into the same location, and rename to.envfile docker compose up -d- Open http://localhost:3000
- You can bring the containers down by
docker compose stop
-
Build the image locally:
docker build --no-cache -t flowise . -
Run image:
docker run -d --name flowise -p 3000:3000 flowise
-
Stop image:
docker stop flowise
TheAnswer is built on top of Flowise and extends its functionality. The project structure is as follows:
All packages inside packages/* are from the original Flowise project:
server: Node backend to serve API logicsui: React frontend for Flowisecomponents: Third-party nodes integrationsembed: Embedding functionalityembed-react: React components for embeddingflowise-configs: Configuration files for Flowiseapi-documentation: Auto-generated swagger-ui API docs from express
TheAnswer adds additional functionality through the packages-answers/* directory:
db: Database interactionseslint-config-custom: Custom ESLint configurationexperimental-prisma-webpack-plugin: Experimental Prisma plugin for Webpacktsconfig: TypeScript configurationtypes: Shared type definitionsui: TheAnswer-specific UI componentsutils: Utility functions
This structure allows TheAnswer to build upon Flowise's core functionality while adding its own features and customizations. The TheAnswer-specific packages extend and enhance the capabilities of the original Flowise project, providing additional tools for AI-powered productivity and workflow management.
- Install PNPM
npm i -g pnpm
-
Clone the repository:
git clone https://github.com/the-answerai/theanswer.git
-
Go into repository folder:
cd theanswer -
Install all dependencies of all modules:
pnpm install
-
Build all the code:
pnpm build
Exit code 134 (JavaScript heap out of memory)
If you get this error when running the above `build` script, try increasing the Node.js heap size and run the script again:# macOS / Linux / Git Bash export NODE_OPTIONS="--max-old-space-size=4096" # Windows PowerShell $env:NODE_OPTIONS="--max-old-space-size=4096" # Windows CMD set NODE_OPTIONS=--max-old-space-size=4096
Then run:
pnpm build
-
Start the app:
pnpm start
You can now access the app on http://localhost:3000
-
For development build:
-
Create
.envfile and specify theVITE_PORT(refer to.env.example) inpackages/ui -
Create
.envfile and specify thePORT(refer to.env.example) inpackages/server -
Run:
pnpm dev
Any code changes will reload the app automatically on http://localhost:3000
-
Flowise supports different environment variables to configure your instance. You can specify the following variables in the .env file inside packages/server folder. Read more
You can view the Flowise Docs here
Deploy AnswerAgent self-hosted in your existing infrastructure. We support various deployments
For AWS deployments, AnswerAgent supports using AWS Secrets Manager to securely store the Flowise encryption key instead of environment variables.
-
Create the encryption key secret:
aws secretsmanager create-secret \ --name FlowiseEncryptionKey \ --secret-string 'your-secure-encryption-key-here' -
Update an existing secret:
aws secretsmanager put-secret-value \ --secret-id FlowiseEncryptionKey \ --secret-string 'your-new-encryption-key-here' -
Add to your environment variables:
# Flowise Encryption Key Override - AWS Secrets Manager SECRETKEY_STORAGE_TYPE="aws" SECRETKEY_AWS_REGION="us-east-1" SECRETKEY_AWS_NAME="FlowiseEncryptionKey"
- Enhanced Security: Keys are encrypted at rest and in transit
- Key Rotation: Easy rotation without application restarts
- Audit Trail: Full access logging and monitoring
- IAM Integration: Fine-grained access control
For detailed AWS deployment instructions, see AWS Deployment Guide.
Get Started with Flowise Cloud.
Feel free to ask any questions, raise problems, and request new features in Discussion.
We welcome contributions to TheAnswer! Whether you're fixing bugs, improving documentation, or proposing new features, your efforts are appreciated. Here's how you can contribute:
See Contributing Guide. Reach out to us at Discord if you have any questions or issues.
Source code in this repository is made available under the Apache License Version 2.0.
TheAnswer provides a script to automatically seed default credentials (API keys, service tokens, etc) into the Flowise database from environment variables. This is useful for setting up new environments or automating credential management.
- Safe by default: Running
pnpm seed-credentialswill perform a dry-run (test mode) and show what would be seeded, but will NOT write to the database. - To actually write credentials: Use
pnpm seed-credentials:writeto perform the operation and insert/update credentials in the database. - Full documentation: See
scripts/seed-credentials/README.mdfor detailed instructions, environment variable requirements, and advanced usage.
Example:
# Test mode (safe, dry-run, default)
pnpm seed-credentials
# Production mode (actually writes credentials)
pnpm seed-credentials:writeThe script supports a wide range of credential types and includes robust safety checks. For more details, troubleshooting, and environment variable examples, refer to the seed-credentials README.
TheAnswer supports optional Lacework FortiCNAPP Agent integration for runtime security monitoring and anomaly detection in AWS Fargate deployments.
Enable Lacework:
- Add
LaceworkAccessToken=your_token_hereto yourcopilot.{environment}.envfile - Deploy with
copilot deploy --env your-environment
Disable Lacework:
- Remove or comment out
LaceworkAccessTokenfrom your environment file - Deploy with
copilot deploy --env your-environment
- Optional Integration: Controlled by presence of
LaceworkAccessToken - Graceful Fallback: Application runs normally if Lacework token is not provided
- Non-Essential Sidecar: Sidecar failure doesn't affect main application startup
- AWS Fargate Optimized: Designed for Copilot deployments
# Connect to container
copilot svc exec --env your-environment
# Check Lacework status
ps aux | grep datacollector
tail -f /var/log/lacework/datacollector.log
# Check environment variables (WARNING: Do not screenshare - contains sensitive tokens)
env | grep -i laceworkFor detailed configuration, troubleshooting, and advanced setup, see Lacework Integration Documentation.
This project uses BWS Secure for managing environment variables across different environments.
📍 1. Visit the Bitwarden Machine Accounts section within your Vault.
- If you login directly to https://vault.bitwarden.com, you will need to navigate to the Machine Accounts section, within the Secrets Manager. The Secrets Manager is located in the left sidebar, typically at the bottom of the page.
- If you don't have access, please refer to the BWS Secure documentation or contact your team administrator
🖱️ 2. Navigate to the Machine Accounts section, and follow these steps:
- Select the appropriate Client/Set of Machine Accounts from the list
- Click on the "Access Tokens" tab
- Click "+ New Access Token" button
- Give the token a meaningful name (e.g., "Your Name - Local Development")
- Click "Save" to generate the token
📋 3. Copy the displayed token (you won't be able to see it again after closing)
💾 4. Add it to your .env file in your project root:
BWS_ACCESS_TOKEN=your_token_here
- BWS_ACCESS_TOKEN: Loads ALL projects associated with that token (recommended for multi-project setups)
- BWS_PROJECT_ID: Loads only a specific project (use for single-project or testing scenarios)
Example for single project:
BWS_PROJECT_ID=00000000-0000-0000-0000-000000000001
The project ID can be found in the Bitwarden Secrets Manager, within the list of projects.
- "No projects found": Verify your token has project access permissions in Bitwarden
- "Access denied": Check that the Machine Account has read permissions for the target projects
- Token not working: Ensure no extra spaces when copying from Bitwarden
- Multiple projects loading: This is normal with BWS_ACCESS_TOKEN - use BWS_PROJECT_ID for single project
To update BWS Secure to the latest version, you can use the convenient script that was added to your package.json:
npm run bws-update # Or use your project's package manager: yarn bws-update, pnpm bws-updateAlternatively, you can run the following command manually from your project root:
rm -rf scripts/bws-secure && git clone git@github.com:last-rev-llc/bws-secure.git scripts/bws-secure && rm -rf scripts/bws-secure/.git && bash scripts/bws-secure/install.sh
