r/opencode • • 5d ago

College Software Engineering project using AI

I have a college swe project to build an app but while using AI and we have to make everything like ci/cd, tests, i will add all of the project for anyone interested in more details but now i don't know exactly where should i start i have some knowledge in using claude code i have been using it in some simple tasks with agent router api key but never tested it for something big or important like this so i want to know what should i do.
It is also a team of 4 project so we have to all be the same on github.

here are the details about the software requirements but maybe read the last grading criteria to know what we really need to do:

PayLink Year Work Project - Student Brief

Your team builds PayLink, a bill-payment and wallet backend, from requirements to a locally deployed CI/CD pipeline, using AI at every step and applying what you learn in lectures and labs.

1. Project at a glance

Read sections 2 and 3 first: they say what to build. Section 4 says what to hand in and when.

ItemDetail
What you buildPayLink: a backend system where customers pay utility bills (electricity, water, mobile, internet) from a digital wallet
Grading100 points, rescaled to the year-work marks
Tools you must useAI assistant (prompting), PlantUML or Mermaid, Docker and docker compose, GitHub Actions, a unit-testing framework
Concepts you must applyPrompt engineering, AI-augmented design, test-driven development, 5 design patterns, an architecture pattern, deployment options
Phase 1 dueWednesday 25 November (30 points)
Phase 2 (final) dueFriday 18 December (70 points)
DiscussionIn your lab, starting Saturday 19 December

2. The problem in detail

2.1 The story

PayLink is a company in Egypt, similar to Fawry or Vodafone Cash. Millions of people pay bills every month through its mobile app and through agents (small shops with a PayLink terminal). Customers do not want to queue at the electricity office, and billers (the utility companies) want to be paid fast and correctly.

PayLink earns money by charging a small service fee on each payment and by paying commission to agents. It also carries a heavy responsibility: it holds customers' money in wallets. If a customer is charged twice, or charged for a payment the biller never received, the company loses trust and money, and may face regulators.

You are the engineering team. Management wants a new backend that is correct with money, easy to extend with new billers, and ready to handle the busiest day of the month.

2.2 One payment, step by step

Sara opens the app and pays her electricity bill from her wallet:

  1. Login and limits. The system identifies Sara and checks her verification level (basic accounts may pay at most 5,000 EGP per day).
  2. Bill inquiry. Sara enters her meter number. PayLink asks the electricity company (ElectroCo) for the bill and shows 350.00 EGP due.
  3. Fee and total. PayLink adds its service fee (2.50 EGP) and shows a total of 352.50 EGP.
  4. Fraud checks. The system checks daily limit, number of payments in the last minute, and whether the account is blocked.
  5. Hold the money. 352.50 EGP is moved from Sara's available balance to a held balance. It is not spent yet.
  6. Call the biller. PayLink sends the payment to ElectroCo with a unique reference.
  7. Confirmation. ElectroCo answers: paid. PayLink turns the hold into a final charge, credits its own fee income, and records the commission if an agent was involved.
  8. Receipt. Sara gets an SMS and a push notification.
  9. Night reconciliation. ElectroCo sends a settlement file listing every payment it received. PayLink compares it with its own records and reports any difference. Every step can fail. Most of your project is about what the system does when it does.

2.3 Key terms you must understand

TermMeaning in this project
BillerA company that issues bills and receives payments (electricity, water, mobile operator, internet provider)
Bill inquiryAsking the biller what a customer owes before paying
WalletA customer account holding money in EGP, with an available balance and a held balance
LedgerA list of entries that records every money movement. A balance is the sum of its ledger entries; you never overwrite a balance directly
HoldMoney reserved for a payment that is not yet confirmed
Service feeWhat PayLink charges the customer per payment
CommissionWhat PayLink pays an agent for a payment made at the agent's terminal
Idempotency keyA unique value sent with a request so that sending it twice has the effect of sending it once
Settlement fileThe biller's daily list of payments it received
ReconciliationComparing PayLink's payments with the settlement file and flagging differences
RefundReturning held or charged money to the wallet after a failed or cancelled payment

2.4 The billers you integrate with

Each biller is a mock server. The instructors give you the contract below; you may write the mock servers yourselves (a small program that follows the contract and can be told to fail on purpose).

BillerServiceProtocol and formatBehaviour you must handle
ElectroCoElectricity billsREST, JSONFast (under 1 second). Inquiry by meter number. Payment confirmed immediately
AquaCoWater billsSOAP-style XML over HTTPSlower (2 to 4 seconds). Different field names and error codes. Rejects payments above the bill amount
TopUpNetMobile top-upREST, JSON, asynchronousReplies "accepted" first, then calls your callback URL minutes later with "success" or "failed"
NetCoInternet billsDaily batch CSV fileNo live inquiry; PayLink uploads a file of payments once per day and receives a result file the next morning

Phase 2 change request: ElectroCo announces a new API version (v2): field names change, amounts move from pounds to piasters, and every request must be signed. Your architecture must absorb this by changing only the ElectroCo integration, not the rest of the system.

2.5 Payment life cycle

Every payment is in exactly one state. Your design must allow only the transitions below (this is the basis of your state diagram and State pattern).

FromEventTo
InitiatedFraud checks pass and wallet has enough fundsFundsHeld
InitiatedFraud check fails or funds are insufficientRejected
FundsHeldRequest sent to billerSentToBiller
SentToBillerBiller confirmsCompleted
SentToBillerBiller refusesFailed
SentToBillerNo answer within the timeoutUnknown
UnknownBiller later confirms (callback, retry or settlement file)Completed
UnknownBiller later refuses, or reconciliation finds no paymentFailed
FailedHold released to the walletRefunded

Completed, Rejected and Refunded are final. A payment in Unknown is never refunded automatically: money is only returned once the system is sure the biller did not receive it.

2.6 Business rules

These numbers are fixed so that every team solves the same problem. Put them in configuration, not in code.

RuleValue
Daily payment limit5,000 EGP for basic accounts, 30,000 EGP for verified accounts
Minimum and maximum single payment5 EGP and 10,000 EGP
Fee for electricity and waterFixed 2.50 EGP
Fee for mobile top-up1.5% of the amount, minimum 1 EGP
Fee for internetTiered: 2 EGP up to 200 EGP, 4 EGP above
PromotionDuring a promotion period the fee is 0 for one chosen biller (configurable start and end dates)
Agent commission40% of the service fee, credited to the agent's wallet when the payment completes
Velocity ruleMore than 5 payments in 60 seconds from one account is blocked for 10 minutes
Biller timeout10 seconds for live billers; after that the payment becomes Unknown
RetriesA payment in Unknown is re-queried up to 3 times (after 1, 5 and 15 minutes) before it waits for reconciliation
Notification retryAn SMS or email that fails is retried 3 times, then marked undelivered
RoundingAll money uses exact decimal types, never floating point

2.7 Hard cases your system must handle

These are the situations that make the project realistic. Each one becomes at least one automated test.

#SituationRequired outcome
1The mobile app sends the same payment twice because the network was slowOne payment, one charge; the second request returns the first result
2ElectroCo takes 12 seconds to answerPayment becomes Unknown, customer is told it is being processed, money stays held
3AquaCo refuses with an error codePayment becomes Failed, hold is released, customer gets an SMS with a clear reason
4Two payments from the same wallet arrive at the same moment and the balance covers only oneOne succeeds, the other is Rejected; the balance never goes negative
5The SMS provider is down when a payment completesThe payment still completes; the SMS is retried and finally marked undelivered
6TopUpNet calls the callback twice with "success"Payment completes once; the second callback is ignored and logged
7The nightly settlement file lists a payment PayLink has as FailedThe difference is flagged in the reconciliation report for support to review
8A new biller must be addedOnly a new integration and configuration are added; existing modules are unchanged

3. Requirements

3.1 Modules (minimum 6)

Each module has its own package or service, its own tests and a clear public interface.

ModuleResponsibility
Accounts and WalletCustomers, agents, verification levels, wallets, ledger entries, holds, top-ups, refunds
Biller CatalogBillers, services, required input fields (meter number, phone number), min and max amounts, active or disabled
Payment ProcessingPayment life cycle, idempotency, orchestration of the steps in section 2.2
Biller IntegrationOne adapter per biller that hides its protocol; timeout, retry and callback handling
Fees and CommissionsFee calculation (fixed, percentage, tiered, promotion) and agent commission
NotificationsSMS, email and push messages with retry; message templates
Fraud Checks (extra)Daily limit, velocity and blocked-account checks as a chain of rules
Reconciliation (extra)Nightly comparison with settlement files and a difference report

3.2 Functional requirements (minimum 25 user stories)

Turn the list below into at least 25 user stories with acceptance criteria in Phase 1. You may add more; you may not remove the ones marked Must.

IDRequirementPriority
FR-1A customer can register and has a basic verification levelMust
FR-2A customer can be upgraded to verified, which raises limitsShould
FR-3A customer can view wallet balance (available and held) and transaction historyMust
FR-4A customer can top up the wallet (simulated card or agent cash)Must
FR-5Every balance change creates a ledger entry; balances are computed from the ledgerMust
FR-6An admin can add, edit and disable billers and servicesMust
FR-7A customer can see the list of billers and the input fields each requiresMust
FR-8A customer can run a bill inquiry and see the amount, fee and total before payingMust
FR-9A customer can pay a bill from the walletMust
FR-10A repeated request with the same idempotency key returns the original resultMust
FR-11A payment follows the life cycle in section 2.5 and no other transitionsMust
FR-12Funds are held before the biller is called and released if the payment failsMust
FR-13A payment that times out becomes Unknown and is re-queried by the retry rulesMust
FR-14The system accepts asynchronous callbacks from TopUpNet and ignores duplicatesMust
FR-15The system supports at least 3 billers with different formats (ElectroCo, AquaCo, TopUpNet); NetCo batch is optionalMust
FR-16Fees follow the rules in section 2.6, including the promotion periodMust
FR-17An agent can pay on behalf of a customer and earns commissionShould
FR-18Payments above the single-payment limit or the daily limit are rejected with a clear reasonMust
FR-19More than 5 payments in 60 seconds blocks the account for 10 minutesShould
FR-20A support employee can search a payment by reference and see its full historyMust
FR-21A support employee can block and unblock an accountShould
FR-22A customer receives an SMS and a push message on completion and on failureMust
FR-23Failed notifications are retried 3 times then marked undeliveredShould
FR-24An admin can edit fee and limit values without redeployingShould
FR-25Every money movement and admin action is written to an audit logMust
FR-26The system produces a daily reconciliation report from a settlement fileShould
FR-27A customer can request a refund of a completed payment; support approves itCould
FR-28An admin can view daily totals: payments, fees earned, commissions paid, failures per billerCould

3.3 Non-functional requirements

Choose and measure at least 6 in Phase 1. The following are the expected ones; your tests or reports must show the number.

QualityTarget
CorrectnessZero double charges and zero negative balances in the concurrency and duplicate tests
Performance100 payments per second sustained for 1 minute against the mock billers
ResilienceA biller outage does not stop payments to other billers
ModifiabilityAdding a biller touches only the Biller Integration module and configuration
Auditability100% of money movements have an audit record with who, when and why
TestabilityAt least 70% line coverage on domain logic, measured in CI

3.4 Technical requirements

  • Language and framework: your choice (Java Spring Boot, .NET, Node NestJS or Python FastAPI), declared in Phase 1 and fixed afterwards.
  • Database: a relational database with at least 10 tables, schema migrations stored in the repository.
  • API: at least 20 REST endpoints documented with OpenAPI, plus one asynchronous flow (a queue, or events inside the application first, then through a broker in Phase 2).
  • Design patterns: at least 5 different patterns applied for a real reason. Suggested: Adapter and Factory (billers), Strategy (fees), State (payment), Chain of Responsibility (fraud checks), Observer (notifications), Command (retries).
  • Architecture: design a layered or hexagonal modular monolith in Phase 1 and build it first in Phase 2; then evolve at least Notifications and Reconciliation to an event-driven or service-based style, with an architecture decision record explaining the choice and the alternatives.
  • Docker: a Dockerfile for each runnable component and one docker compose file that starts the application, the database and the mock billers.
  • CI/CD: a GitHub Actions workflow that builds, lints, tests, reports coverage, builds images and deploys the stack locally.
  • Tests: unit tests, integration tests for the API and database, and one automated test for each hard case in section 2.7.
  • UI: a simple web page or a command-line client is enough. Marks are for the backend.

4. Deliverables and deadlines

How to submit: for each phase, tag your repository (phase-1, final) and upload one PDF report to the course page by the deadline. The tag must contain everything listed. The TA grades the tagged version, not later commits.

PhaseDeadlinePointsYou submit
1. Requirements, design, DevOps foundationWednesday 25 November30Requirements pack, design pack, Docker and CI skeleton, prompt log
2. Final systemFriday 18 December60Working system with tests, 5 patterns, architecture evolution, change request, local deployment, report, demo video
Individual discussionIn your lab, from Saturday 19 December10Live change and questions, alone

Phase 1 (due 25 November): requirements, design, DevOps foundation

  1. Requirements pack (PDF + /docs/requirements.md): problem summary in your own words; stakeholders; at least 25 user stories with acceptance criteria written as given/when/then; at least 6 measurable non-functional requirements; priorities (Must, Should, Could); a list of questions the AI asked or ambiguities you found, and the decisions you made.
  2. Design pack (/docs/design/, source files, not screenshots): use-case diagram; domain class diagram; sequence diagrams for "pay a bill" and "refund a failed payment"; state diagram of the payment (section 2.5); ER diagram of the database. Use PlantUML or Mermaid, generated by prompts and then corrected by you.
  3. DevOps foundation: repository with protected main branch and pull-request rules; a Dockerfile and docker compose file that start an empty application and the database; a GitHub Actions workflow that builds, lints and runs at least one test on every push.
  4. Prompt log: at least 5 entries, including 2 where the first AI answer was wrong and you improved the prompt. Done when: a teammate can clone the repository, run docker compose up, see the application start, and see a green pipeline on the phase-1 tag.

Phase 2, final (due 18 December): the complete system

You have three weeks (the midterm is on 12 December, so plan around it). Phase 2 includes everything built after Phase 1.

  1. Working system: Accounts and Wallet, Biller Catalog, Payment Processing, Biller Integration, Fees and Commissions, and Notifications, running with the database against at least three mock billers (ElectroCo, AquaCo, TopUpNet), with the API documented in OpenAPI.
  2. Tests with TDD evidence: for at least 3 features, the commit history shows the failing test first, then the code, then the cleanup. Coverage above 70% on domain logic, reported by the pipeline. One automated test for each of the 8 hard cases in section 2.7.
  3. Five design patterns: for each, a short note with the problem, the code before, the AI refactoring prompt and answer, your critique of the answer (what was wrong, unnecessary or risky), and the final code. Add a table mapping each pattern to the folders in your repository.
  4. Architecture: at least 3 architecture decision records in /docs/adr/ (architecture style, how modules communicate, who owns which data), each comparing at least 2 options with trade-offs. Add a one-page analysis of performance, availability and modifiability for your choice. Then evolve Notifications and Reconciliation through a message broker or event bus (or an equivalent service split), running in docker compose.
  5. Change request: apply the ElectroCo API v2 change (section 2.4). The report lists exactly which files changed and shows that the other modules did not.
  6. Pipeline and local deployment: on every push the pipeline builds, lints, runs all tests, reports coverage and builds the images. On main it deploys the full stack locally (self-hosted runner or compose on a team laptop), runs a health check, and documents a rollback step.
  7. Deployment comparison (one page): your local deployment against two cloud options (for example a virtual machine and a managed container service) in cost, scaling and risk.
  8. Final report (maximum 15 pages): architecture overview, pattern catalogue, test and coverage results, pipeline description, and lessons about AI (where it helped, where it failed, with numbers from your prompt log).
  9. Demo video (8 minutes): pay a bill through a mock biller, show a failed payment being refunded, then show the pipeline deploying.
  10. Prompt log: at least 5 new entries, including at least 5 AI suggestions you rejected or fixed, with the reason. The README lets a stranger run the system with two commands. Done when: every minimum item in section 3 is met, a push to main runs the tests and redeploys locally, and the ElectroCo v2 change works.

Individual discussion (in your lab, from 19 December)

Your TA announces the lab schedule. You attend alone. You receive a small change on your own team's code, such as a new biller, a new fee rule or a new notification channel, and implement it live with a test (20 minutes). Then you answer questions about your commits and your team's decisions (10 minutes).

5. Using AI

Use AI at every stage: requirements, diagrams, code, tests, refactoring, pipeline files and ADRs. You are graded on your judgement of the output, not on the output itself.

  • Write structured prompts: role, context, constraints, output format, and an example when useful.
  • Keep the prompt log in /docs/prompt-log.md using the table below. Be honest: rejected answers earn marks when you explain why.
  • You must understand every line you commit. Name the AI tool in the commit message when AI wrote more than half of a change.
  • Another teammate reviews every pull request before merge. Run and test AI code before you trust it.
  • Never paste passwords, real personal data or other teams' code into an AI tool.
  • Copying another team's work, or not being able to explain your own code at the discussion, is academic misconduct, whatever your log says. Prompt log table format (example row):
DateAuthorStageTool and modelPromptSummary of answerVerdict (accepted, fixed, rejected) and why
2026-11-12Student ADesign(tool name)(paste your prompt)(2 lines)Fixed: the AI missed the held balance in the wallet class

6. Grading (100 points)

The total is rescaled to the year-work marks.

PhaseCriterionPoints
1Requirements: complete, testable, prioritised, ambiguities resolved10
1Diagrams: correct, consistent with each other, AI errors documented and fixed10
1Docker and first CI workflow work from a clean clone5
1Prompt log: structured prompts, honest verdicts5
2Working system and documented API; all 8 hard cases pass10
2TDD evidence and coverage above 70%10
2Design patterns: right pattern for a real problem, critique of AI refactoring10
2Architecture decision records, quality analysis and event-driven evolution10
2ElectroCo v2 change absorbed by changing only the integration5
2Pipeline, local deployment with health check and rollback, deployment comparison10
2Final report, README and 8-minute demo5
2Individual discussion: live change and questions10
Total100

7. Rules

  • Teams: register through the form in section 1. Changes to the team need instructor approval before Phase 2.
  • Roles rotate between phases: requirements and product lead, quality and DevOps lead, architecture lead. Your report names who led what.
  • Repository: one private GitHub repository; add the instructor and TAs; main branch protected; work through pull requests and issues.
  • Late work: minus 10% of that phase's points for each day late, up to 3 days; after that the phase gets zero.
  • Questions: ask in the lab or on the course page; do not share code between teams.
4 Upvotes

13 comments sorted by

1

u/Financial-Grass6753 5d ago

so? tldr missing smh

1

u/NOT_Kimo 5d ago

i didn't knew about that i am new to reddit

1

u/6T_K9 5d ago

You literally just paste all that into Claude and he’ll get it done 1 promot btw

1

u/NOT_Kimo 5d ago

we can't do that we have to build it step by step and always understand and make sure that everything is architecturally correct and tested and done correctly and not to be spaghetti code

1

u/for4f 5d ago

team of 4 with agents is mostly a coordination problem, not a model problem. the thing that saved us was one AGENTS.md at the repo root with the actual rules (how to run tests, what not to touch) plus tiny vertical slices, like one endpoint working end to end before anyone builds the next thing. also get ci running on day one, github actions on every pr catches the works-on-my-machine stuff before it turns into a fight lol. and keep one person owning the schema, four people freelancing on migrations is how you get spaghetti

2

u/NOT_Kimo 5d ago

So how can we build a agents.md i know of course we will use ai for it but what do you think should i make sure is there. And do you recommend a model or a harness that i can use antigravity github copilot for students what ever is free is good. And the problem is we are also very new to even ci building i never made ci cd before that's why i am confused to what should i do

2

u/for4f 5d ago

keep the agents.md short, like half a page max. ours is basically how to run the thing (compose up, the test command), plus the non-negotiables every endpoint gets a test, migrations go through one pattern, don't invent new ones. anything longer and nobody reads it, agents included lol. write that first version by hand though, it's the one file the whole team should actually agree on.

for free stuff the copilot student pack is honestly the easy button since you're already living in github. opencode pairs fine with it if you want to try the agent loop thing, just point it at something cheap and keep the slices small. and for ci don't overthink it, the default workflow template github suggests when you click the actions tab is like 80% of what you need. lint plus tests on every pr, that's it. add the docker build step later once the app actually runs.

2

u/NOT_Kimo 5d ago

Thank you so much for the help can i dm you if i had some further questions when we start building the app

2

u/for4f 5d ago

yeah man go for it. though honestly for build questions you'll get faster answers just posting here, way more eyes on it than my dms lol

2

u/j-cruz_4698 3d ago

Add this brief's money invariants to AGENTS.md too: use exact decimal types, derive balances from ledger entries, and never auto-refund an Unknown payment.

1

u/for4f 3d ago

oh yeah if you're moving real money those three lines earn their spot in there lol. decimal types especially, float math on balances will bite you eventually. i'd still keep it to like three bullet lines though, the stuff that costs actual money if the agent gets creative. the moment that file turns into a spec doc nobody reads it, agents included

1

u/Complex_Tie6774 13h ago

So you wanna pay for someone to do it for you ?

1

u/NOT_Kimo 11h ago

Yeh do you wanna do it lol