Revert 5 copilot/fix with copilot - #4452
Closed
julesdemangeot-ship-it wants to merge 19 commits into
Closed
julesdemangeot-ship-it wants to merge 19 commits into
julesdemangeot-ship-it wants to merge 19 commits into
Conversation
Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
…amme-parrainage-evodron
… docs Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
- Phase 1: monorepo workspace setup (evodron/) - Phase 2: CLI wrapper with Commander.js + splash screen + auth/referral/rewards/stats commands - Phase 3: Fastify API with JWT auth, rate limiting, CORS - Phase 4: User accounts with JWT + refresh tokens, bcrypt password hashing - Phase 5: Referral system with anti-abuse, self-referral prevention, IP tracking - Phase 6: Virtual credits reward system with configurable rules - Phase 7: Stats endpoints + abuse flags admin API - Phase 8: 24 passing tests (unit + integration) - Docs: ARCHITECTURE.md, THIRD_PARTY.md, EVODRON.md, .env.example Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
…vodron-product feat: EVODRON — rate limiting, health endpoint, Docker, CI, docs
…s, milestone filter, cleanup Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
…actor-into-product feat: EVODRON platform — referral system, rewards, user accounts, API, CLI
Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
… errors Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
…pilot-again Fix CI: build shared packages before linting
…rent-code-base Consolidate EVODRON on the workspace product and harden the platform baseline
Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
…pilot Fix CI: build workspace dependencies before running lint
julesdemangeot-ship-it
requested review from
a team
and
a balanced review from Copilot
August 12, 2026 01:42
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces the EVODRON platform, including referral/reward services, a Fastify API, CLI wrapper, SQLite persistence, deployment assets, documentation, and tests.
Changes:
- Adds authentication, referrals, rewards, sessions, statistics, and anti-abuse features.
- Adds EVODRON CLI commands and shared TypeScript packages.
- Adds Docker deployment, CI, documentation, and frontend assets.
Reviewed changes
Copilot reviewed 74 out of 81 changed files in this pull request and generated 23 comments.
Show a summary per file
| File | Description |
|---|---|
tests/referral.test.js |
Tests legacy referral flows. |
tests/health.test.js |
Tests legacy health endpoint. |
tests/anti-abuse.test.js |
Tests legacy abuse controls. |
src/routes/referral.js |
Implements legacy referral routes. |
src/routes/health.js |
Implements legacy health route. |
src/routes/auth.js |
Implements legacy authentication. |
src/models/user.js |
Adds legacy user persistence. |
src/models/reward.js |
Adds legacy reward persistence. |
src/models/referral.js |
Adds legacy referral persistence. |
src/middleware/rateLimiter.js |
Adds Express rate limits. |
src/middleware/auth.js |
Adds Express JWT authentication. |
src/db/schema.sql |
Defines legacy SQLite schema. |
src/db/database.js |
Initializes legacy database. |
src/config/rewards.js |
Configures legacy rewards. |
SECURITY.md |
Documents security policy. |
public/register.html |
Adds registration UI. |
public/referral.html |
Adds referral information UI. |
public/login.html |
Adds login UI. |
public/js/referral.js |
Implements dashboard behavior. |
public/index.html |
Adds legacy landing page. |
public/dashboard.html |
Adds referral dashboard. |
public/css/style.css |
Styles legacy frontend. |
package.json |
Adds root workspace commands. |
package-lock.json |
Locks root package metadata. |
evodron/scripts/setup.sh |
Adds developer setup script. |
evodron/packages/shared/tsconfig.json |
Configures shared TypeScript build. |
evodron/packages/shared/src/index.ts |
Defines shared schemas and types. |
evodron/packages/shared/package.json |
Configures shared package. |
evodron/packages/db/tsconfig.json |
Configures database build. |
evodron/packages/db/src/seed.ts |
Seeds reward rules. |
evodron/packages/db/src/schema.ts |
Defines Drizzle schema. |
evodron/packages/db/src/migrate.ts |
Implements database migrations. |
evodron/packages/db/src/index.ts |
Exports database APIs. |
evodron/packages/db/src/client.ts |
Creates SQLite client. |
evodron/packages/db/package.json |
Configures database package. |
evodron/packages/cli/vitest.config.mts |
Configures CLI tests. |
evodron/packages/cli/tsconfig.json |
Configures CLI compilation. |
evodron/packages/cli/src/ui/splash.ts |
Adds CLI splash screen. |
evodron/packages/cli/src/services/config.ts |
Persists CLI configuration. |
evodron/packages/cli/src/services/config.test.ts |
Tests CLI configuration. |
evodron/packages/cli/src/services/api.ts |
Implements API client and refresh. |
evodron/packages/cli/src/commands/stats.ts |
Adds statistics command. |
evodron/packages/cli/src/commands/run.ts |
Delegates to Copilot CLI. |
evodron/packages/cli/src/commands/rewards.ts |
Adds reward commands. |
evodron/packages/cli/src/commands/referral.ts |
Adds referral commands. |
evodron/packages/cli/src/commands/auth.ts |
Adds authentication commands. |
evodron/packages/cli/src/bin/evodron.ts |
Defines CLI entrypoint. |
evodron/packages/cli/package.json |
Configures CLI package. |
evodron/packages/api/vitest.config.mts |
Configures API tests. |
evodron/packages/api/tsconfig.json |
Configures API compilation. |
evodron/packages/api/src/routes/users.ts |
Adds user profile routes. |
evodron/packages/api/src/routes/stats.ts |
Adds usage statistics route. |
evodron/packages/api/src/routes/sessions.ts |
Tracks sessions and awards. |
evodron/packages/api/src/routes/rewards.ts |
Exposes rewards and rules. |
evodron/packages/api/src/routes/referrals.ts |
Exposes referral data. |
evodron/packages/api/src/routes/auth.ts |
Implements account and token flows. |
evodron/packages/api/src/routes/admin.ts |
Adds administrative routes. |
evodron/packages/api/src/middleware/helpers.ts |
Adds identifiers and hashing helpers. |
evodron/packages/api/src/middleware/auth.ts |
Adds Fastify authentication. |
evodron/packages/api/src/index.ts |
Builds and starts the API. |
evodron/packages/api/src/__tests__/unit/helpers.test.ts |
Tests API helpers. |
evodron/packages/api/src/__tests__/api.test.ts |
Tests API workflows. |
evodron/packages/api/package.json |
Configures API package. |
evodron/packages/api/:memory:?cache=shared-wal |
Adds generated database artifact. |
evodron/package.json |
Configures npm workspace. |
evodron/docs/THIRD_PARTY.md |
Documents third-party components. |
evodron/docs/EVODRON.md |
Documents product usage. |
evodron/docs/ARCHITECTURE.md |
Documents system architecture. |
evodron/.gitignore |
Ignores workspace artifacts. |
evodron/.env.example |
Documents workspace environment. |
EVODRON.md |
Documents repository entrypoint. |
Dockerfile |
Builds production API image. |
docker-compose.yml |
Defines local deployment. |
CONTRIBUTING.md |
Adds contribution guidance. |
app.js |
Adds legacy Express entrypoint. |
.gitignore |
Ignores root artifacts. |
.github/workflows/ci.yml |
Adds workspace CI. |
.env.example |
Documents root environment. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "db:seed": "npm run seed --workspace=packages/db" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18.0.0" |
| "scripts": { | ||
| "setup": "cd evodron && npm ci && npm run build && npm run db:migrate && npm run db:seed", | ||
| "build": "cd evodron && npm run build", | ||
| "test": "cd evodron && npm test", |
Comment on lines
+33
to
+40
| VOLUME ["/data"] | ||
| ENV EVODRON_DB_URL=file:/data/evodron.db | ||
| ENV EVODRON_API_HOST=0.0.0.0 | ||
| ENV EVODRON_API_PORT=3000 | ||
|
|
||
| EXPOSE 3000 | ||
|
|
||
| USER node |
| logger: { | ||
| level: process.env['LOG_LEVEL'] ?? 'info', | ||
| }, | ||
| trustProxy: true, |
|
|
||
| if (!user) { | ||
| // Constant-time response to prevent user enumeration | ||
| await bcrypt.hash('dummy', 1); |
Comment on lines
+103
to
+105
| // Anti-self-referral (cannot refer yourself) | ||
| if (referrerId === userId) { | ||
| // This cannot happen here since user doesn't exist yet, but guard anyway |
| userId: string, | ||
| timestamp: string, | ||
| ) { | ||
| const minSessions = parseInt(process.env['EVODRON_REWARD_MIN_SESSIONS'] ?? '3', 10); |
Comment on lines
+52
to
+54
| if (!jwtSecret || jwtSecret === 'change-me-to-a-long-random-secret') { | ||
| throw new Error('EVODRON_JWT_SECRET must be set to a secure value'); | ||
| } |
Comment on lines
+200
to
+204
| // Only award once — check if already awarded | ||
| const alreadyAwarded = await db | ||
| .select({ id: schema.rewards.id }) | ||
| .from(schema.rewards) | ||
| .where( |
|
|
||
| await db | ||
| .update(schema.users) | ||
| .set({ credits: onboardingRule.credits, updatedAt: timestamp }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.