Skip to content

Feat/production deployment workflow#978

Open
hally-Ayo wants to merge 133 commits into
bakeronchain:mainfrom
hally-Ayo:feat/production-deployment-workflow
Open

Feat/production deployment workflow#978
hally-Ayo wants to merge 133 commits into
bakeronchain:mainfrom
hally-Ayo:feat/production-deployment-workflow

Conversation

@hally-Ayo
Copy link
Copy Markdown
Contributor

Summary

Type of Change

  • Bug fix
  • New feature
  • Smart contract change
  • Documentation
  • Breaking change
  • Other (please describe)

Checklist

  • Tests added or updated
  • No hardcoded secrets or private keys
  • If contract change: cargo test passes
  • If frontend change: npm run typecheck passes
  • If backend change: npm test passes
  • Related issues linked (Closes #...)
  • Self-review completed
  • Code follows project style guidelines

Screenshots (if applicable)

Testing

Additional Notes

closes #735
closes #740
closes #741
closes #734

bakarezainab and others added 30 commits March 26, 2026 22:23
- Add soroban_sdk import to fungible-allowlist to fix missing panic_handler on wasm32
- Regenerate package-lock.json to fix npm ci lock file mismatch
- Fix floating promise lint errors in DaoPropose, Dashboard, and server/index.ts
- Fix invalid class field syntax in scholarshipTreasury (React hook in class body)
- Fix ReactMarkdown className prop removed in v10 (wrap with div)
- Run prettier across src/ to fix formatting check failures

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix merge conflict in upload.routes.ts (missing JSDoc opening comment).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add contractevent to soroban_sdk imports in course_milestone
- Remove unresolved learn_token_client re-export from course_milestone
- Add AlreadyEnrolled/NotEnrolled/DuplicateSubmission variants to Error enum
- Fix export type syntax in src/types/contracts.ts for isolatedModules
- Replace mockContractImports with mockContracts in src/test/setup.ts
- Add missing DonorStats type import in src/hooks/useDonor.ts
- Fix LRNHistoryChart tooltip formatter to accept ValueType | undefined
- Fix Dashboard.tsx progressMap -> getCourseProgress

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Drop non-existent ValueType import; use inferred type in formatter
- Clone env before consuming it in upgrade_timelock_vault::is_upgrade_ready

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contracts:
- scholar_nft: replace broken merge-artifact lib.rs with clean upstream version
- scholar_nft: rewrite test.rs to match actual API (remove non-existent types)
- fungible-allowlist: fix #[contract] placement, drop unused Env import
- course_milestone: remove unused constants/params, add ContractPaused error,
  use correct error variants, add get_milestone_status helper
- upgrade_timelock_vault: fix duplicate create_env, BytesN::random, env.register,
  correct should_panic error strings, fix borrow-after-move
- cargo fmt across all contracts

Frontend:
- LRNHistoryChart: remove non-existent ValueType recharts import
- Admin.tsx: fix floating promise errors (void fetchStats/fetchMilestones)
- Prettier fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… unit tests

- Add verify_milestone() function for admin milestone verification with LRN token minting
- Add reject_milestone() function for admin milestone rejection
- Add get_milestone_status() function to query milestone states
- Create learn_token_client module for LRN token integration
- Add comprehensive unit tests covering all functions:
  - enroll() happy path, duplicate enroll, unknown course scenarios
  - verify_milestone() happy path, non-admin caller, already verified cases
  - reject_milestone() happy path, wrong state, non-admin scenarios
  - get_milestone_status() all state transitions
  - LRN minting integration tests
  - Pause functionality tests for all operations
- Update error handling with new error variants (NotEnrolled, DuplicateSubmission, InvalidState, ContractPaused)
- Fix existing functions to use correct error variants
- Update initialize function to store learn token contract address

Closes bakeronchain#230
- Trigger on pull_request targeting main
- Run typecheck, lint, vitest, and build steps
- Upload dist artifact on success
…scarded errors from courseImilestore,scholar_nft,fungible_allowlist to allow cargo to build successfully
- Document LRN as soulbound reputation score with supply model
- Document GOV as transferable voting token with mint/burn model
- Add flywheel diagram showing LRN → GOV → donor → proposal cycle
- Honest accounting of V1 centralization and V2 roadmap
- Flag GOV burn mechanic as open design question

Closes bakeronchain#139
- Poll comments every 15s (configurable via VITE_COMMENT_POLL_MS)
- Add "Last updated" timestamp for user feedback
- Silent refresh prevents UI flickering during background polls
- Clean up interval on unmount to prevent memory leaks
- Add localized string for last updated timestamp
Poll comments every 15s (configurable via VITE_COMMENT_POLL_MS)
- Add "Last updated" timestamp for user feedback
- Silent refresh prevents UI flickering during background polls
- Clean up interval on unmount to prevent memory leaks
- Add localized string for last updated timestamp
closes: bakeronchain#435
- Add server/src/db/migrations/ with 005_governance_and_comments.sql
  (comments, comment_votes, proposals, scholar_balances)
- Fix dollar-quote syntax bug in 003_course_content_schema.sql ($ -> \$\$)
- Rewrite scripts/migrate.ts: supports 'up' and 'down' (rollback) commands,
  typed with PoolClient, tabs formatting to match project style
- Strip all CREATE TABLE / DDL from db/index.ts; initDb() now only verifies
  connection and confirms schema_migrations table exists, exits with clear
  error if migrations haven't been run
- Add migrate and migrate:rollback scripts to server/package.json
- Add .github/workflows/server-ci.yml: spins up Postgres 16, runs migrations,
  then runs jest tests on every push/PR touching server/
- Regenerate package-lock.json to fix missing @noble/hashes@2.0.1 (npm ci failure)
- Fix xdr.ScVal.scvU64 call — wrap tokenId with new xdr.Uint64() (TS2345)
- Add NftRow type to getScholarCredentials to fix implicit any on row (TS7006)
- Add non-null assertion on JWT_SECRET in admin.middleware (TS2769)
- Add JWT_SECRET fallback to course-admin.middleware when JWT_PUBLIC_KEY absent
- Set process.env.JWT_SECRET in courses-api.test so requireCourseAdmin can verify tokens
- Fix upload.test and comments.test — switch from removed uploadRouter/commentsRouter
  exports to createUploadRouter/createCommentsRouter with inline test JwtService

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Anuoluwapo25 and others added 30 commits April 26, 2026 18:35
…nnection-pooling-configuration-and-health-monitoring

Add database connection pooling configuration and health monitoring
…er-tests

test: add integration tests for event indexer and poller bakeronchain#578
…ibility-aria-labels

Feat/accessibility aria labels
Implement course browsing, lesson viewing, and wallet connection
- Enforce RS256 exclusively; remove hardcoded HS256 fallback secret from
  admin and course-admin middlewares (production already blocked HS256, now
  development no longer falls back to a known-constant secret)
- Add iss (learnvault) and aud (learnvault-api) claims to every signed token
  and validate them on verification to prevent token substitution across services
- Add jti (UUID) claim to every token to support future revocation tracking
- Validate RSA public key is >= 2048 bits at server startup
- Expose ephemeral dev keys to process.env so standalone middlewares use RS256
  instead of HS256 even in key-less development mode
- Add jwt.service.test.ts covering: HS256 rejection, wrong iss/aud rejection,
  missing jti/sub rejection, expired token rejection, and valid round-trip
- Update admin-milestones.test.ts to set JWT_SECRET explicitly (no longer
  relies on removed hardcoded fallback)
- Document key rotation procedure in .env.example
- Enforce RS256 exclusively; remove hardcoded HS256 fallback secret from
  admin and course-admin middlewares (production already blocked HS256, now
  development no longer falls back to a known-constant secret)
- Add iss (learnvault) and aud (learnvault-api) claims to every signed token
  and validate them on verification to prevent token substitution across services
- Add jti (UUID) claim to every token to support future revocation tracking
- Validate RSA public key is >= 2048 bits at server startup
- Expose ephemeral dev keys to process.env so standalone middlewares use RS256
  instead of HS256 even in key-less development mode
- Add jwt.service.test.ts covering: HS256 rejection, wrong iss/aud rejection,
  missing jti/sub rejection, expired token rejection, and valid round-trip
- Update admin-milestones.test.ts to set JWT_SECRET explicitly (no longer
  relies on removed hardcoded fallback)
- Document key rotation procedure in .env.example
Replace Morgan + raw console.* calls with pino throughout the server.

- Add pino and pino-pretty dependencies; remove unused morgan and @types/morgan
- Create src/lib/logger.ts: central pino logger with JSON output in production,
  pretty-print in development, silent in tests; LOG_LEVEL env var support
- Add maskAddress() helper to truncate Stellar wallet addresses in logs
  (first 4 + last 4 chars) so full addresses are never logged as PII
- Replace 55 console.log/warn/error calls across all controllers, services,
  middleware, routes, db, and workers with typed pino child loggers
  (logger.child({ module: 'xxx' })) preserving structured { err } objects
- Update request-logger.middleware.ts to use pino as default logger while
  keeping the injectable interface for tests
- Remove dead morgan import from index.ts
- Fix admin-milestones.controller.test.ts to set process.env.JWT_SECRET
  explicitly (no hardcoded fallback exists since JWT security PR)
- Document LOG_LEVEL env var and log rotation via logrotate/pino-roll in
  .env.example
Covers form validation, navigation, API submission, and confirmation
across all five wizard steps with 21 passing test cases.
…ance-improvements

perf/fix: compression, CI fixes, migration idempotency, TypeScript bu…
…implementation

security: audit and harden JWT implementation (bakeronchain#716)
…gging-pino

Devops/structured logging pino
…xss-hardening

security: harden markdown rendering and add CSP
feat: implement credential metadata controller and script to upload course completion NFT assets to IPFS
feat: add GuessTheNumber component and necessary dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet