Skip to content

Dx/devcontainer codespaces#394

Merged
0xVida merged 2 commits intoStellar-Fluid:mainfrom
BernardOnuh:dx/devcontainer-codespaces
Mar 30, 2026
Merged

Dx/devcontainer codespaces#394
0xVida merged 2 commits intoStellar-Fluid:mainfrom
BernardOnuh:dx/devcontainer-codespaces

Conversation

@BernardOnuh
Copy link
Copy Markdown
Contributor

dx: add devcontainer for instant contributor onboarding

Closes #216

Summary

Adds a .devcontainer/devcontainer.json so any contributor can start coding immediately in a fully pre-configured environment — locally in VS Code or one-click via GitHub Codespaces. No manual toolchain setup required.

What's included

Config Detail
Base image mcr.microsoft.com/devcontainers/rust:1-bookworm (official MS devcontainer image)
Node.js v20 via devcontainer feature
Rust stable via devcontainer feature
Extensions ESLint, Prettier, rust-analyzer, Prisma
Post-create cp .env.example .envnpm installcargo build (server + cli)
Port forwarding 3000 (API), 5173 (Frontend), 5432 (Postgres)

Acceptance criteria

  • .devcontainer/devcontainer.json with Node v20 and Rust stable
  • Pre-installed extensions: ESLint, Prettier, rust-analyzer, Prisma
  • Post-create command runs npm install and cargo build
  • .env.example copied to .env automatically on container creation

Implementation notes

  • Uses the official MS devcontainer base image with layered features — no custom Dockerfile needed, keeping the setup minimal and maintainable
  • .env copy uses cp -n (no-clobber) so it never overwrites an existing .env if the container is rebuilt
  • remoteUser: vscode ensures the container runs as non-root, following devcontainer best practice
  • editor.formatOnSave wired up with correct per-language formatters (Prettier for TS/JS, rust-analyzer for Rust)

How to test

GitHub Codespaces:

  1. Go to https://github.com/BernardOnuh/fluid
  2. Click Code → Codespaces → Create codespace on dx/devcontainer-codespaces
  3. Wait for the container to build and the post-create command to finish
  4. Verify node -v outputs v20.x, rustc --version outputs a stable version
  5. Confirm .env exists and extensions are active in the sidebar

VS Code locally:

  1. Clone the repo and open in VS Code
  2. Install the Dev Containers extension
  3. Run Reopen in Container from the command palette
  4. Verify the same checks above

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@BernardOnuh Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@0xVida 0xVida merged commit 742075d into Stellar-Fluid:main Mar 30, 2026
7 of 10 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.21.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Devcontainer Configuration for VS Code / GitHub Codespaces

2 participants