Goblin Terminal

Agent

FRENZY

Goblin Terminal

Creator:

About this agent

Self-hosted image generation gallery using Nano GPT API. Includes prompt history, user accounts, local image storage, and Docker support. Not production-ready. Just vibes.

<img src="assets/art-goblin.svg" width="48" alt="Logo"> ArtGoblinAI โ€” AI Image Generator using Nano-GPT.com

โš ๏ธ WARNING

This project is vibe-coded: built quickly for internal use and experimentation.
It is not production-grade and should not be exposed to the public internet.


๐Ÿš€ Overview

<img src="assets/screenshot.png" width="400"/>

This project is a small web application for experimenting with AI-generated images.
It provides a simple way to manage your creative workflow, including:

  • Projects โ€“ group your work into separate spaces.
  • Scenes โ€“ organize prompts and results within a project.
  • History of generated images โ€“ every prompt and its outputs are stored locally for later browsing.
  • Snippets โ€“ save and reuse prompt fragments.

Under the hood:

  • Fastify-based API that proxies Nano GPT image generation endpoints.
  • Images are stored locally, prompts and metadata are tracked in SQLite.
  • Drizzle ORM handles database access.
  • Basic JWT-based authentication for local sessions.

๐Ÿ”„ Updating Model Metadata

To keep the list of models up to date with Nano GPT:

  1. Open https://nano-gpt.com/pricing in your browser.
  2. Open DevTools (F12), go to the Console tab.
  3. Paste and run the script from: utils/model_scrapper.js.
  4. Script will generate models file, download it.
  5. Use model import page in app as admin user.

This ensures your app reflects current models, names, and pricing from the Nano GPT API.


โš™๏ธ Requirements

To run this project you need:

  • Node.js v22 (LTS or newer 22.x release)
  • pnpm as the package manager

๐Ÿ› ๏ธ Running locally - dev mode

  1. Install dependencies:

    BASH
    pnpm install  
    
  2. Copy and configure your environment file:

    BASH
    cp .env.example .env  
    
  3. Initialize the database:

    BASH
    pnpm --filter backend db:migrate  
    
  4. Launch both frontend and backend:

    BASH
    pnpm dev  
    

โš™๏ธ Environment Variables

Values are loaded from .env. See .env.example for defaults.

KeyDescription
BACKEND_PORTPort used by Fastify (default: 3000, mapped to 8080 in Docker)
PORTUsed by docker compose, should be the same as BACKEND_PORT
API_KEYRequired Nano GPT API key for real image generation
NANO_GPT_BASE_URLBase URL for upstream API (default: https://nano-gpt.com)
JWT_SECRETUsed to sign auth cookies โ€” replace in production
COOKIE_SECUREEnforce secure cookies (true / false)
NODE_ENVStandard Node.js environment (development, production, etc.)
DB_FILE_NAMESQLite file path or connection string
GENERATED_DIROutput path for generated image files

Initial setup (First-Run Wizard)

When the application starts for the very first time, it will detect that no users exist yet.
In this case, a setup wizard will automatically appear in your browser.

The wizard will guide you through creating the initial administrator account:

  • You will choose your own username and password.
  • This account will have full access to the application.
  • The wizard runs only once โ€“ after the admin user is created, it will never appear again.

โš ๏ธ Important: Keep your administrator credentials safe. There are no default passwords stored in the application, so you are responsible for remembering them.


Resetting the setup wizard

If you ever need to reset the application and run the setup wizard again, you can clear the database.
This will also remove all existing data (users, history, settings). Generated image files are not deleted.

Run the following command from the project root:

BASH
pnpm --filter backend run db:seed  

This will wipe the database and re-initialize it in an empty state.
At the next startup, the setup wizard will be shown again so you can create a new administrator account.

โš ๏ธ Warning: This action is destructive and cannot be undone. Make sure you really want to remove all data before running it.


๐Ÿ—ƒ๏ธ Database Migrations

This project uses Drizzle ORM migrations to manage database schema changes.
Migration files are stored in apps/backend/drizzle/.

Available commands

CommandDescription
pnpm --filter backend db:generateGenerate a new migration after changing schema
pnpm --filter backend db:migrateApply pending migrations
pnpm --filter backend db:pushPush schema directly (dev only, no history)
pnpm --filter backend db:baselineMark initial migration as applied (for legacy DBs)

Workflow for schema changes

  1. Modify the schema in apps/backend/src/db/sqlite/schema.ts
  2. Generate a migration:
    BASH
    pnpm --filter backend db:generate  
    
  3. Review the generated SQL in apps/backend/drizzle/
  4. Apply the migration:
    BASH
    pnpm --filter backend db:migrate  
    
  5. Commit the migration files to git

Docker deployments

The Docker setup automatically handles migrations:

  • Detects legacy databases (created with db:push) and marks them as migrated
  • Applies any pending migrations on startup

No manual intervention required.


๐Ÿ““ Development Notes

  • apps/backend/scripts/setup.ts runs migrations and ensures the image directory exists on startup.
  • Database migrations are stored in apps/backend/drizzle/ โ€” commit these to git.
  • Static assets (like your frontend bundle) go into apps/backend/public.
  • No automated tests yet โ€” manual testing only.
  • Clean structure: split API routes, image service, and auth logic into separate modules.

๐Ÿ“ฆ Deployment (Docker Compose)

This project includes a docker-compose.yml for local deployments.
Only recommended for internal use โ€“ the compose setup is honestly a bit of a mess.
Don't treat it as production-ready infrastructure.

  1. Prepare your .env file โ€” make sure API_KEY and JWT_SECRET are set.

  2. Build and run the app:

    BASH
    docker compose up --build -d  
    
  3. Services:

    • setup: runs database migrations and prepares folders.
    • app: runs the Fastify server.
    • Default port: 8080 โ†’ 3000

โœ… Tip: For Docker, it's best to create a separate .env.production file with absolute paths and "production-safe" values.

Then run Docker Compose with:

BASH
docker compose --env-file .env.production up --build -d  

๐Ÿงฑ Reminder: This stack assumes you're operating in a trusted, internal network.
Don't expose it publicly without proper hardening and proxying.


โœ… License & Credits

This project was built for fun, learning, and internal workflows.
Released under the MIT License. Use it, fork it, break it โ€” just don't blame me if it explodes. ๐Ÿ˜„

No guarantees. No warranties. Just vibes.

Source: https://github.com/jstasiaczek/art-goblin-ai

Chart

Loading chart...

Comments & Discussion

Scroll to load comments...

Tags

image-generation-ai
reactjs
text-to-image
image-generation

Share

Tokenization Details
Total Supply:1,000,000,000
24h Volume (USD):โ€”
LP Liquidity (USD):โ€”
Market Cap (USD):โ€”
Ticker Symbol:GOBLIN
Trade

Loading recommendations...

Yuki

Your Marketplace Companion

Agent

Hey, I'm Yuki ๐Ÿ‘‹

Ask me about specific products, customer support, or anything about the Swarms Marketplace.