Urgent.News

What's breaking now, across thousands of outlets.

Tech

Code Is Open, Secrets Aren't: Organizing Your Project for AI Agents

This Article is also found in Web-Warrior-Toolbox Anything you put in the frontend or expose through routes is visible to users and AI agents, while secrets like API keys and credentials must stay server‑side. In this article I propose organizing your project with clear boundaries to make it obvious what’s safe to expose and what must be hidden, reducing the chance of leaking sensitive data. I…

This article discusses how to organize a project for AI agents while keeping sensitive information secure. Any information exposed in the frontend or accessible through routes can be seen by users and AI agents. However, secrets such as API keys and credentials should remain on the server-side. The suggested project structure includes separate folders for different environment variables and build scripts.

The project directory is organized as follows:

- ~/projects

- my-project

- back-env

- .env

- .env.prod

- .env.prod.pc

- builder

- build.sh

- front-env

- .env

- .env.dev

- .env.dev.pc

- .env.prod

- repos

- my-project-back

- .env.example

- src

- my-project-front

- .env.example

- src

The main concept is to grant AI agents access to the code repositories while keeping the .env files in higher-level directories to maintain their privacy. Frontend files require building, necessitating multiple .env files depending on the deployment environment. To address this, environment files are organized in their respective folders. Additionally, a build.sh script is used to build the project using the appropriate .env file.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Whoosh on the no-GIL Python: pure-Python search that can finally use your cores

For fifteen years, the standard answer to "why is my pure-Python search slow to index?" was: the GIL . Tokenizing, stemming, and building postings is all CPU-bound Python, and only one thread gets to…

  • Python 3.14 introduced no-GIL build for pure-Python CPU-bound tasks
  • Whoosh search library benefits from no-GIL for parallel indexing
  • Concurrency contract requires one writer per thread to avoid lock contention

Introducing Celmis: self-hosted code intelligence over a symbol graph

Celmis is self-hosted code intelligence. It reads a set of repositories once and keeps a symbol graph of them; asking questions, reviewing pull requests, auditing dependencies, routing alerts and…

  • Celmis is a self-hosted code intelligence tool
  • Creates symbol graph of repositories for answers
  • Serves MCP endpoint using same index

More from Thursday 27 August →