Add a clearly labelled demo-data script for local development

オープン
#116 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
nodejs, typescript

調査の方向性

Start with apps/api/package.json to see how existing scripts are wired, and apps/api/src/config/env.ts for where the NODE_ENV=production refusal belongs. Read the schemas under apps/api/src/models to learn the required fields for users, posts, comments and follows, then write an idempotent seeder (upsert or find-or-create) using the demo_ prefixed names. Document the command in docs/DEVELOPMENT.md; done when it runs on an empty database, repeats without duplicates, refuses in production, and passes npm run typecheck, npm test and npm run lint.

索引モデルが issue の本文から書いたものです。

説明

api enhancement help wanted

Developers need a populated app to test feeds and profiles, but must not confuse it with real data.

What to do

Add npm run seed:demo that creates a handful of obviously fake users, posts, comments and follows in the local database. Every demo user must have a name that makes it clear (for example demo_alice), small realistic numbers, no fake paid subscriptions, and the script must refuse to run when NODE_ENV=production. Running it twice must not create duplicates. Document it in docs/DEVELOPMENT.md.

Where to look

apps/api/src/models, apps/api/package.json, apps/api/src/config/env.ts.

Done when

The script runs on an empty database, is safe to repeat, refuses in production, and has a short test or a documented manual check.

How to work on it

Fork the repo, branch from main, and follow CONTRIBUTING.md. Run npm run typecheck, npm test and npm run lint before opening a PR. Comment here if you'd like to take it, and ask if anything is unclear.


Generated by Claude Code

主要言語
TypeScript
スター
6
フォーク
6
平均マージ
1時間 59分
マージ済み PR(30日)
59

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Haseeb-MernStack/commune のほかの issue

Haseeb-MernStack/commune の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。