Content Gopher is a service that processes and manages content using the Gemini AI model. The service consists of a backend API running in a Docker container and a modern frontend built with SolidJS.
- Docker and Docker Compose
- Just command runner (optional, for using the provided commands)
- Gemini API key
- Node.js (for frontend development)
.
├── src/
│ ├── api/ # Backend API service code
│ └── app/ # Frontend application
│ └── content-gopher/ # SolidJS frontend
├── docker-compose.yml # Docker Compose configuration
├── justfile # Just commands for common tasks
└── .gitignore # Git ignore rules
- Create a
.envfile in thesrc/apidirectory with the following variables:GEMINI_API_KEY=your_api_key_here
The development environment runs the API service only, with the frontend running locally for development.
just devThis will:
- Start the API service on port 7272
- Mount the development output directory at
~/Desktop/gopher-output-dev - Run the service with the development configuration
The production environment runs both the API and frontend services in Docker containers.
just prodThis will:
- Start the API service on port 7070
- Start the frontend service on port 3000
- Mount the production output directory at
~/Desktop/gopher-output-prod - Run the services with the production configuration
You can run both development and production environments simultaneously:
just dev # Starts development environment
just prod # Starts production environmentEach environment will:
- Use its own isolated Docker network
- Have its own output directory
- Run on different ports
- Not interfere with each other
To stop all services:
just downFor frontend development, you can run the frontend locally:
-
Navigate to the frontend directory:
cd src/app/content-gopher -
Install dependencies:
npm install # or pnpm install -
Start the development server:
npm run dev # or pnpm dev -
Build for production:
npm run build # or pnpm build
- SolidJS - A declarative, efficient, and flexible JavaScript library for building user interfaces
- TailwindCSS - A utility-first CSS framework
- Vite - Next Generation Frontend Tooling
- TypeScript - For type-safe development
The service is configured through environment variables:
SERVICE_NAME: Name of the service (default: content-gopher)ENVIRONMENT: Environment setting (default: development)HOST: Host address (default: 0.0.0.0)PORT: Port number (default: 7272)DEFAULT_OUTPUT_DIRECTORY: Directory for output files (default: /gopher-output)GEMINI_MODEL: Gemini model to use (default: gemini-2.5-flash-preview-05-20)
The service uses different output directories for development and production:
- Development:
~/Desktop/gopher-output-dev - Production:
~/Desktop/gopher-output-prod
Make sure these directories exist on your system.
- Development API:
http://localhost:7272 - Production API:
http://localhost:7070 - Production Frontend:
http://localhost:3000
The frontend uses modern development tools and practices:
- TypeScript for type safety
- TailwindCSS for styling
- Vite for fast development and building
- SolidJS for reactive UI components
To start developing the frontend:
- Make sure you have Node.js installed
- Install dependencies using npm or pnpm
- Run the development server with
npm run devorpnpm dev - The frontend will be available at
http://localhost:5173by default