Codex is an open-source, multi-user article editor built with TipTap and Next.js. It's designed for teams and individuals who need a powerful, customizable platform for creating and managing content like case studies, blog posts, and technical articles.
Created by Wireframe Studio β the experimental R&D arm of Wireframe Company β Codex powers the official Wireframe website and serves as a foundation for empowering team members to create portfolio-worthy content.
- TipTap-powered with extensive customization options
- Rich formatting: Bold, italic, strikethrough, headings, lists
- Smart links with auto-detection and custom protocols
- Custom extensions for specialized content blocks
- Drag & drop support for intuitive content organization
- History management with undo/redo functionality
- S3/Cloudflare R2 integration for file storage
- Image upload with background removal capabilities
- Gallery components for image collections
- Image-text blocks for rich media content
- File management with automatic cleanup
- User authentication and role management
- Article visibility controls (public/private/company-wide)
- Portfolio integration for personal content
- Company homepage featuring for exceptional articles
- Collaborative editing capabilities
- RESTful API with API key authentication
- Article listing and retrieval endpoints
- File download and management
- Real-time updates via tRPC
- Type-safe with TypeScript and Zod validation
- Blog posts for regular content
- Case studies for detailed project documentation
- Custom content blocks for specialized layouts
- Tagging system for content organization
- Analytics tracking for views and engagement
- Node.js 18+ or Bun
- PostgreSQL database
- Cloudflare R2 or AWS S3 bucket
-
Clone the repository
git clone https://github.com/wireframe-studio/codex.git cd codex -
Install dependencies
bun install # or npm install -
Set up environment variables
cp .env.example .env.local
Configure the following variables:
DATABASE_URL="postgresql://..." CLOUDFLARE_ENDPOINT="https://..." CLOUDFLARE_ACCESS_ID="..." CLOUDFLARE_ACCESS_KEY="..." CLOUDFLARE_R2_BUCKET_NAME="..."
-
Set up the database
bun run db:push # or npm run db:push -
Start the development server
bun dev # or npm run dev -
Open your browser Navigate to http://localhost:3000
- Access the editor through the web interface
- Choose content type (Blog Post or Case Study)
- Write your content using the rich text editor
- Add media by uploading images or files
- Set visibility (private, public, or company-wide)
- Publish when ready
Include your API key in the request headers:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://your-codex-instance.com/api/trpc/access.article.listconst response = await fetch('/api/trpc/access.article.list', {
headers: {
Authorization: 'Bearer YOUR_API_KEY'
}
});
const { articles } = await response.json();const response = await fetch('/api/trpc/access.article.getById', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
articleId: 'article-id-here'
})
});Codex comes with a modular extension system. You can easily add custom extensions:
// src/deps/tiptap/extensions.ts
import { YourCustomExtension } from './extensions/your-extension';
export const tiptapExtensionsEditable: Extensions = [
...baseExtensions,
YourCustomExtension,
History
];Create specialized content blocks for your use case:
// Example: Custom testimonial block
const TestimonialExtension = Node.create({
name: 'testimonial',
group: 'block',
content: 'paragraph+'
// ... configuration
});Customize the appearance using Tailwind CSS:
/* src/styles/tiptap.css */
.element-heading {
@apply text-2xl font-bold mb-4;
}
.element-paragraph {
@apply mb-4 leading-relaxed;
}- Frontend: Next.js 15, React 19, TypeScript
- Editor: TipTap 2.12 with custom extensions
- Backend: tRPC for type-safe APIs
- Database: PostgreSQL with Prisma ORM
- Storage: Cloudflare R2 (S3-compatible)
- Styling: Tailwind CSS with custom components
- Authentication: JWT-based with bcrypt
src/
βββ app/ # Next.js app router
βββ deps/ # Shared dependencies
β βββ tiptap/ # TipTap extensions and components
β βββ trpc/ # tRPC configuration
β βββ shadcn/ # UI components
βββ modules/ # Feature modules
β βββ article/ # Article management
β βββ access/ # Public API access
β βββ file/ # File handling
β βββ editor/ # Editor interface
βββ global/ # Global components and utilities
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow the existing code style
- Add tests for new features
- Update documentation as needed
- Ensure TypeScript types are properly defined
This project is licensed under the MIT License - see the LICENSE file for details.
- TipTap for the amazing editor framework
- Next.js for the React framework
- tRPC for end-to-end typesafety
- Prisma for database management
- Tailwind CSS for styling
- Live Demo: wireframe.hr
- Documentation: [Coming Soon]
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with β€οΈ by Wireframe Studio
Part of the Wireframe Company collective
