Skip to content

Revert 5 copilot/fix with copilot - #4452

Closed
julesdemangeot-ship-it wants to merge 19 commits into
github:mainfrom
julesdemangeot-ship-it:revert-5-copilot/fix-with-copilot
Closed

julesdemangeot-ship-it wants to merge 19 commits into
github:mainfrom
julesdemangeot-ship-it:revert-5-copilot/fix-with-copilot

Conversation

@julesdemangeot-ship-it

Copy link
Copy Markdown

No description provided.

Copilot AI and others added 19 commits August 11, 2026 17:35
Co-authored-by: julesdemangeot-ship-it <307666271+julesdemangeot-ship-it@users.noreply.github.com>
… 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
julesdemangeot-ship-it requested review from a team and a balanced review from Copilot August 12, 2026 01:42

@julesdemangeot-ship-it julesdemangeot-ship-it left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread evodron/package.json
"db:seed": "npm run seed --workspace=packages/db"
},
"engines": {
"node": ">=18.0.0"
Comment thread package.json
"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 thread Dockerfile
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 })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants