Add a clearly labelled demo-data script for local development

Abierto
#116 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
nodejs, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
6
Forks
6
Merge medio
1 h 59 min
PR fusionados (30 d)
59

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Haseeb-MernStack/commune

Todos los issues de Haseeb-MernStack/commune

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.