OpenForge is an open-source platform for creating, managing, and interacting with AI assistants. It supports both API-based language models and in-browser WebLLM models for complete privacy.
Try the Deployed Demo →
Watch the Demo Video →
- Create Custom Bots: Design AI assistants with specific personalities and knowledge areas
- WebLLM Support: Run models directly in your browser with no data leaving your device
- API Integration: Connect to various LLM providers including OpenAI, Anthropic, Cohere, and more
- Chat Interface: User-friendly conversation UI with message history
- Settings Management: Fine-tune model parameters like temperature and context size
- Authentication: GitHub-based authentication with user profiles
- Responsive Design: Works on both desktop and mobile devices
- Git-like Version Control: Track changes to your bots with commits and branches
- Branch Management: Create and switch between different versions of your bots
- Pull Requests: Review and merge changes between branches with inline comments
- Visual Diff Tool: Compare changes between versions with an intuitive side-by-side diff viewer
- Model Export: Download your models as standalone applications with a local HTML interface
- Collaboration: Work with team members on the same bot with access controls
- Next.js 14 (App Router)
- React
- MongoDB
- NextAuth.js
- Tailwind CSS
- shadcn/ui components
- WebLLM for in-browser model execution
- JSZip for model export functionality
- Node.js 18.0 or higher
- MongoDB database (local or Atlas)
- GitHub OAuth application for authentication
-
Clone the repository:
git clone https://github.com/Varun-Patkar/openforge.git cd openforge -
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.localfile in the root directory with the following variables:# MongoDB Connection MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/openforge # NextAuth Configuration NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret-key-here # GitHub OAuth GITHUB_ID=your-github-oauth-app-id GITHUB_SECRET=your-github-oauth-app-secret -
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
MONGODB_URI: Connection string for MongoDBNEXTAUTH_URL: Base URL for NextAuth.jsNEXTAUTH_SECRET: Secret key for NextAuth.js session encryptionGITHUB_ID: GitHub OAuth application client IDGITHUB_SECRET: GitHub OAuth application client secret
To use API-based LLM providers, you'll need to:
- Create accounts with your preferred providers (OpenAI, Anthropic, etc.)
- Generate API keys from their developer portals
- Add these keys in the Preferences section of OpenForge
- Sign in with GitHub
- Set up your LLM preferences (WebLLM or API provider)
- Create your first bot by clicking "Create New Bot" on the dashboard
- Provide a name and description for your bot
- Configure the system prompt to define its personality and capabilities
- Set model parameters (temperature, top-p, context window)
- Add example conversations to guide the bot's behavior
- Save the bot to start chatting
- Select a bot from your dashboard
- Click "Chat with this Bot" to start a conversation
- Type messages in the input field at the bottom of the chat window
- Adjust settings using the settings dialog if needed
- Committing Changes: Save versions of your bot with descriptive commit messages
- Creating Branches: Experiment with changes by creating a new branch
- Pull Requests: Submit changes for review and merge them into the target branch
- Code Reviews: Comment on specific lines of changes in pull requests
- Resolving Comments: Mark comments as resolved before completing pull requests
- Navigate to your bot's page
- Click the "Download" button to export the model
- The downloaded zip contains:
model.json: Your custom model configurationindex.html: A standalone interface to run your model locally
openforge/
├── app/ # Next.js App Router pages and layouts
│ ├── api/ # API routes and endpoints
│ ├── auth/ # Authentication pages
│ ├── bots/ # Bot creation and management pages
│ ├── chat/ # Chat interface pages
│ ├── dashboard/ # User dashboard
│ └── preferences/ # User preferences page
├── components/ # Reusable React components
├── context/ # React context providers
├── lib/ # Utility functions and helpers
│ ├── api.js # API client functions
│ ├── chat-api.js # Chat-specific API functions
│ ├── mongodb.js # MongoDB connection
│ └── webllm-models.js # WebLLM model definitions
├── public/ # Static assets
└── styles/ # Global styles
- Create branches to work on features without affecting the main version
- The master branch is protected and serves as the stable version
- Create pull requests to merge changes from feature branches
- Create a branch for your changes
- Make and commit your modifications
- Create a pull request targeting the branch you want to merge into
- Review changes in the visual diff tool
- Add and resolve comments
- Complete the pull request to merge changes
Export your model as a standalone application that can run without the OpenForge platform. The exported package includes:
- Model configuration with your custom parameters
- WebLLM-compatible interface for local usage
- No server dependencies required
