Skip to content

Conversation

@eulervoid
Copy link
Collaborator

Adds repo-scoped tasks for easier development across services.

  • task install Installs dependencies for enter, text and image services
  • task dev Runs dev servers for enter, text and image services with automatic restart on code changes

Copy link
Member

@voodoohop voodoohop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eulervoid

i just ran it locally and I'm a bit unsure. It involved installing two extra binary dependencies and two new config files.

it could be done with one well-structured bash script, a Makefile or a package.json in the root (optionally with a lightweight node-based executer like concurrently or npm-run-all)

i'm always thinking of the overhead needed when we add extra tooling. We'd have to document where to download and how to install the two new deps, etc.

These are simplified to illustrate

package.json

{
  "scripts": {
    "dev": "concurrently -n enter,text,image \"npm run dev:enter\" \"npm run dev:text\" \"npm run dev:image\"",
    "dev:enter": "cd enter.pollinations.ai && npm run dev",
    "dev:text": "cd text.pollinations.ai && npm run dev",
    "dev:image": "cd image.pollinations.ai && npm run dev"
  }
}

makefile

install:
	cd enter.pollinations.ai && npm install &
	cd text.pollinations.ai && npm install &
	cd image.pollinations.ai && npm install &
	wait

dev:
	@trap 'kill 0' EXIT; \
	cd enter.pollinations.ai && npm run dev & \
	cd text.pollinations.ai && npm run dev & \
	cd image.pollinations.ai && npm run dev & \
	wait

@eulervoid
Copy link
Collaborator Author

My thinking in using task as the top level task runner was that we might have services other than node, or want to run docker containers, etc. make is definitely an option there, i just find the syntax super oldschool and error prone. Shell scripts have the same drawbacks as make, anything a bit more complicated gets difficult to maintain in my view.

If we use nix, installing the dependencies is done by the dev shell, so i personally don't think its that much of an issue, but i understand if it's not for you.

Maybe we throw out task, replace it with node, but keep process-compose? I find it very handy how it lets me see the individual logs, restart individual services etc. Or maybe the node runners have similar functions?

@voodoohop
Copy link
Member

@eulervoid I prefer a solution that doesnt require an additional install unless it's light and node-based as in it uses the same tooling we use everywhere. i think there's probably an easy way to set up process-compose for your local environment which is outside of version control.

even pm2 feels like overkill to me because it has all kinds of features for longer running processes and sometimes makes it difficult for ai agents to debug and interact with the testing environment. i think grepping or filtering for individual service logs is quite trivial if we set it up nice. concurrently seems quite good for that in terms of features but also open just to bash or make or everything in the scripts part in the root package.json

@eulervoid
Copy link
Collaborator Author

Ok, lets close this PR and i will add my process-compose.yml to gitignore.

@eulervoid eulervoid closed this Nov 3, 2025
@github-project-automation github-project-automation bot moved this from To Do to Done in Dev Nov 3, 2025
@voodoohop voodoohop reopened this Nov 3, 2025
@github-project-automation github-project-automation bot moved this from Done to To Do in Dev Nov 3, 2025
@voodoohop
Copy link
Member

voodoohop commented Nov 3, 2025

@eulervoid I quickly vibecoded the solution with concurrently and a simple package.json

Screenshot 2025-11-04 at 00 14 44

i think it fulfills the purpose at least for my use cases and is a bit more lightweight considering everything is already node.

{
  "name": "pollinations-monorepo",
  "private": true,
  "scripts": {
    "install:all": "npm install --prefix enter.pollinations.ai && npm install --prefix text.pollinations.ai && npm install --prefix image.pollinations.ai",
    "dev": "concurrently --kill-others-on-fail --prefix '[{name}]' --names 'enter,text,image' -c 'auto' 'npm run dev --prefix enter.pollinations.ai' 'npm run dev --prefix text.pollinations.ai' 'npm run dev --prefix image.pollinations.ai'",
    "dev:enter": "npm run dev --prefix enter.pollinations.ai",
    "dev:text": "npm run dev --prefix text.pollinations.ai",
    "dev:image": "npm run dev --prefix image.pollinations.ai"
  },
  "devDependencies": {
    "concurrently": "^9.1.0"
  }
}

thats the root package.json now. check if you think its ok. i think concurrently also has ways of dynamically hiding / unhiding specific services

@voodoohop
Copy link
Member

@claude can you look at how we can start the enter service in a way it is connecting the local running services? create an env for it? override the variaboes?
respond concisely

@claude
Copy link
Contributor

claude bot commented Nov 4, 2025

Claude finished @voodoohop's task —— View job


Solution for enter service local development

  • Read enter service configuration
  • Identify service URL configuration
  • Provide solution for local development

Service URLs are configured in wrangler.toml:

  • Lines 40-41: IMAGE_SERVICE_URL and TEXT_SERVICE_URL
  • env.local section (lines 68-69) already has localhost URLs configured

To connect enter to local services:

  1. Use the --env local flag:

    npm run dev -- --env local

    This reads env.local.vars which already has:

    • IMAGE_SERVICE_URL = "http://localhost:16384"
    • TEXT_SERVICE_URL = "http://localhost:16385"
  2. Or create .dev.vars file in enter.pollinations.ai/:

    IMAGE_SERVICE_URL=http://localhost:16384
    TEXT_SERVICE_URL=http://localhost:16385
  3. Update root package.json dev script:

    "dev:enter": "npm run dev --prefix enter.pollinations.ai -- --env local"

Port mapping:

  • enter: 3000 (wrangler.toml line 7)
  • text: 16385 (startServer.js)
  • image: 16384 (src/index.ts)

--- • PR Branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Do

Development

Successfully merging this pull request may close these issues.

3 participants