SwiftRelay

← 全部冲刺笔记

Start a Weekend Side Project with Codex

Agent 快速起步EN

Pick one useful problem, build one complete workflow, and leave Sunday with something you can demonstrate. For this walkthrough, build a reading queue: paste an article title and URL, save it, and mark it as read. Keep accounts, recommendations, and AI summaries outside the first release.

1. Define Your Reading Queue Before Opening Codex

Create a README with a short project brief. Choose a stack you already understand; this weekend is about finishing a product, not evaluating frameworks. Specify browser storage for the first version so you can avoid a backend until you actually need one.

  • Audience: People who collect articles but lose track of them.
  • Core workflow: Add, view, complete, and delete reading items.
  • Acceptance criteria: Items survive refreshes, invalid URLs show an error, and the layout works on a phone.
  • Not this weekend: Authentication, synchronization, payments, and automatic article extraction.

2. Install Codex and Establish a Clean Starting Point

Install the Codex CLI using npm install -g @openai/codex. Open your project directory and run codex to begin. Codex runs locally in your terminal and can help you work on the repository. Follow the authentication instructions for your chosen setup. ([github.com](https://github.com/openai/codex/blob/main/README.md?plain=1&utm_source=openai))

Initialize Git and commit your starting files before requesting changes. Ask Codex: Read the README, propose the smallest implementation plan, and identify any missing decisions. Do not edit files yet. Review its plan yourself, especially any proposed dependencies or services.

3. Give Codex Durable Project Instructions

Add an AGENTS.md file at the repository root. Codex recognizes this file as project guidance, making it a useful place for conventions you want available across tasks. Keep the instructions specific to this repository. ([developers.openai.com](https://developers.openai.com/cookbook/examples/codex/iterating-development-workflows-with-codex?utm_source=openai))

Include your chosen stack, actual development and test commands, and boundaries such as: preserve existing behavior, avoid unnecessary dependencies, and explain changes before introducing external services. OpenAI also recommends maintaining AGENTS.md as part of a Codex workflow. ([cdn.openai.com](https://cdn.openai.com/pdf/6a2631dc-783e-479b-b1a4-af0cfbd38630/how-openai-uses-codex.pdf?utm_source=openai))

4. Set Up SwiftRelay Without Mixing Up Credentials

If you want pay-as-you-go model access for your project, SwiftRelay works with Codex and OpenAI-compatible SDKs, with billing per token. Sign up for SwiftRelay to receive a small gift credit and try your first requests.

Use SwiftRelay's Codex setup instructions for the coding agent rather than assuming an SDK configuration will work unchanged. Codex supports custom provider configuration, and its provider protocol requirements matter when connecting an endpoint. ([github.com](https://github.com/openai/codex/blob/main/codex-rs/responses-api-proxy/README.md?utm_source=openai))

If you later add an AI feature through an OpenAI-compatible SDK, use https://api.fastapirelay.com/v1 as the SDK base URL. Keep that application configuration separate from Codex configuration. Store credentials in environment variables, exclude local secret files from Git, and never put a relay key in browser code.

5. Build One Complete Reading Queue Workflow

Give Codex a bounded implementation request: Implement adding and listing reading items using browser storage. Validate URLs, show an empty state, and add tests for validation and persistence. Do not add authentication or external APIs.

Review the diff, run the application, and add an item yourself. Refresh the page to verify persistence. Only then request completion and deletion controls. Commit each working increment so you have clear recovery points rather than one enormous generated change.

6. Spend Sunday Testing the Uncomfortable Cases

Ask Codex to inspect the implementation for missing acceptance criteria before proposing more features. Explicit goals, success conditions, and boundaries are part of OpenAI's documented iterative development workflow. ([developers.openai.com](https://developers.openai.com/cookbook/examples/codex/iterating-development-workflows-with-codex?utm_source=openai))

Test blank titles, malformed URLs, duplicate entries, long text, keyboard navigation, and a narrow viewport. Request regression tests for confirmed bugs, then review both the tests and fixes. Ask which checks actually ran and which remain unverified; do not treat a confident explanation as test evidence.

7. Ship the Demo and Leave a Useful Restart Note

Run the production build and deploy using your hosting provider's documented process. Test the deployed version from a fresh browser session. Explain that reading items stay in that browser rather than syncing between devices.

Finish with a README covering setup, commands, limitations, and the next small improvement. Save bigger ideas in a backlog. Your weekend deliverable is a working reading queue with understandable code and verified behavior—not an unfinished platform with an impressive feature list.

接着读

又来跑一圈?登录