Skip to content

Latest commit

Β 

History

71 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‡ͺπŸ‡Έ Leer en EspaΓ±ol

CTF Write-up Builder Logo CTF Write-up Builder

Next.js React TypeScript Security License

A modern and private application for creating, organizing and exporting CTF write-ups with AI assistance

Designed by and for the cybersecurity community, CTF Write-up Builder allows you to document your CTFs professionally with Markdown support, automatic screenshots, AI content generation, and multiple export formats.

🌐 Live Demo

πŸš€ Try the application here

No registration, no tracking, no limits. Your privacy is our priority.

πŸ“Έ Screenshots

Main View AI Editor Export
Main View AI Editor Export

✨ Key Features

πŸ€– Intelligent AI Generation

  • Google Gemini and OpenAI ChatGPT integrated
  • Generate specific content for each section
  • Automated vulnerability analysis
  • Contextual tool suggestions

πŸ“ Advanced Editor

  • Native Markdown with real-time preview
  • Integrated screenshots per section
  • Predefined templates for different CTF types
  • Customizable tags for organization

πŸ“„ Multiple Export Formats

  • Professional PDF with optimized formatting
  • Standard Markdown for GitHub/GitLab
  • JSON for backup and collaboration

🌐 Multi-language

  • Complete Spanish and English
  • Adaptive interface by region
  • Localized AI prompts

πŸ›‘οΈ Privacy and Security

  • 100% local - No external servers
  • Encrypted API keys stored locally
  • Open source - Fully audited
  • No tracking or telemetry

πŸ“± User Experience

  • Responsive design - Works on mobile and desktop
  • Professional hacker theme
  • Auto-save to prevent data loss

πŸš€ Installation

Prerequisites

  • Node.js 18.0 or higher
  • npm or yarn

Local Installation

# Clone the repository
git clone https://github.com/ilanami/ctf_writeup_builder.git

# Navigate to directory
cd ctf_writeup_builder

# Install dependencies
npm install

# Run in development mode
npm run dev

The application will be available at http://localhost:3000

Production Build

# Create optimized build
npm run build

# Run in production
npm start

🐳 Running with Docker

For a quick and isolated start, you can run the application using the official Docker image available on Docker Hub.

Prerequisites

  • Docker Desktop installed and running.

Quick Start

  1. Pull the image from Docker Hub:

    docker pull ilanamin/ctf-writeup-builder:1.0
  2. Run the container:

    docker run -d -p 3000:3000 --name ctf-app ilanamin/ctf-writeup-builder:1.0
  3. Open the application: Navigate to http://localhost:3000 in your web browser.

Docker Commands

  • Stop the container:

    docker stop ctf-app
  • Start the container again:

    docker start ctf-app
  • View logs:

    docker logs ctf-app
  • Remove the container:

    docker rm ctf-app

πŸ’‘ How to Use

1. Configure AI (Optional)

2. Create Write-up

  • Click "New" to start
  • Fill in basic information (title, difficulty, etc.)
  • Add sections according to your methodology

3. Generate Content with AI

  • In each section, click "Generate with AI"
  • Briefly describe what you found
  • AI will generate professional content

4. Add Screenshots

  • Use "Add Screenshot" in each section
  • Drag and drop images
  • Screenshots are automatically included in exports

5. Export

  • PDF for professional reports
  • Markdown for documentation
  • JSON for backup/collaboration

πŸ”‘ API Configuration

Google Gemini (Recommended - Free)

  1. Go to Google AI Studio
  2. Create a new API Key
  3. Copy it to the app configuration

OpenAI ChatGPT

  1. Go to OpenAI Platform
  2. Create a new API Key (starts with sk-)
  3. Copy it to the app configuration

πŸ”’ Security: Your API keys are stored encoded locally. They are never sent to external servers except to AI providers for content generation.

πŸ—οΈ Technical Architecture

Technology Stack

  • Frontend: Next.js 15, React 18, TypeScript
  • Styling: Tailwind CSS, CSS Modules
  • State: React Context + useReducer
  • AI: Google Gemini & OpenAI APIs
  • Security: DOMPurify, Input sanitization
  • Performance: React.memo, useCallback optimizations

Project Structure

src/
β”œβ”€β”€ app/                 # Next.js App Router
β”œβ”€β”€ components/          # Reusable React components
β”œβ”€β”€ contexts/           # Global state (Context API)
β”œβ”€β”€ utils/              # Utilities and helpers
β”œβ”€β”€ ai/                 # AI API integrations
└── types/              # TypeScript definitions

πŸ›‘οΈ Security

This application has been fully audited for security:

  • βœ… XSS Prevention - DOMPurify on all dynamic HTML
  • βœ… Input Sanitization - Validation on all inputs
  • βœ… API Security - Keys encoded locally
  • βœ… Dependency Audit - No known vulnerabilities
  • βœ… OWASP Compliance - Best practices implemented

See SECURITY.md for complete details.

🌍 Multi-language

Supported languages:

  • πŸ‡ͺπŸ‡Έ EspaΓ±ol (Spain/Latin America)
  • πŸ‡ΊπŸ‡Έ English (US/International)

Want to add your language? Contribute here

πŸ“‹ Roadmap

v1.1 - Performance Plus

  • Complete lazy loading
  • Virtual scrolling for large lists
  • Bundle size optimization

v1.2 - UX Enhancements

  • More CTF templates
  • Keyboard shortcuts
  • Drag & drop to reorganize sections

v1.3 - Collaboration

  • Export to more formats (DOCX, HTML)
  • Git integration
  • Basic collaborative mode

v1.4 - Advanced Features

  • Plugin system
  • Custom AI prompts
  • CTF platform integrations

🀝 Contributing

Contributions are welcome! This application is made by and for the CTF community.

Ways to Contribute

  • πŸ› Report bugs in Issues
  • πŸ’‘ Suggest features
  • 🌍 Translate to new languages
  • πŸ”§ Submit Pull Requests
  • ⭐ Star the project

Local Development

# Fork the repository
# Clone your fork
git clone https://github.com/YOUR-USERNAME/ctf_writeup_builder.git

# Create branch for your feature
git checkout -b feature/new-functionality

# Make changes and commit
git commit -m "feat: add new functionality"

# Push and create Pull Request
git push origin feature/new-functionality

🎁 Support my Projects and Tools

If you've enjoyed my projects and tools and found them useful, consider buying me a coffee or making a donation as a thank you.

It's not mandatory, but it would help me tremendously to continue creating tools like this and to pay for the cybersecurity certifications I want to obtain.

Thank you very much for your support!

PayPal Buy Me A Coffee

πŸ“ž Support and Contact

πŸ› Report Issues

πŸ“§ Direct Contact

For general inquiries, collaborations or proposals: writeup_builder@proton.me

πŸ“„ License

This project is under the MIT license. See LICENSE for details.

⚠️ Note about Content Security Policy (CSP) and 'unsafe-eval'

To ensure all features work correctly in development mode, the Content Security Policy (CSP) allows 'unsafe-eval' only in development. This is required by some dependencies for local development.

In production (e.g., on Vercel), the CSP configuration does not include 'unsafe-eval', so the application is secure and compliant with platform security standards.

Do not modify the CSP to allow 'unsafe-eval' in production. The current configuration manages this automatically depending on the environment.

If you have issues with buttons or features not working in development:

  1. Open the next.config.mjs file at the root of the project.
  2. Make sure the CSP line looks like this:
    {
      key: 'Content-Security-Policy',
      value: process.env.NODE_ENV === 'development'
        ? "default-src 'self'; img-src 'self' data: https:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self';"
        : "default-src 'self'; img-src 'self' data: https:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self';"
    },
  3. Save the file and restart the development server:
    npm run dev
  4. Reload the page in your browser with Ctrl + F5.

In production, 'unsafe-eval' is NOT allowed and the app is secure.

πŸ™ Acknowledgments

Thanks to all CTF players, open source contributors and the cybersecurity community that made this project possible.

Technologies Used


⭐ If this project helps you, consider giving it a star ⭐

Made with ❀️ for the CTF community

πŸš€ Try Application β€’ πŸ“– Documentation β€’ πŸ› Report Bug

About

"A modern and private application for creating, organizing and exporting CTF write-ups with AI assistance"

Resources

Code of conduct

Contributing

Security policy

Stars

41 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages