Abdulali Ibrahim · · 78 min read
SiliconCodeCamp began as an online learning platform and ended up occupying a substantial part of my time between 2023 and 2025. I designed and developed it independently, from the applications people would interact with to the services, data models and infrastructure behind them. Most of the code predates my regular use of AI coding agents; the limited AI assistance I used was primarily for polishing parts of the interface.
The project is no longer operational. I still have its source, though, and there is a considerable difference between looking at an old screenshot and opening the repository again. A screenshot shows a course, a player and perhaps a dashboard. The repository shows why a course has separate representations for editing and browsing, why a payment record cannot answer every question about access, and why changing the visibility of a lecture can involve more than updating a field in a database.
This article follows those decisions from the user interface down to the data and deployment infrastructure. If you want the short version, the platform separated the public website, the learning experience and the administration system; published its public course catalog as a cacheable artifact; and left personalized access, progress and payments to the learner API. Those boundaries are the thread connecting the rest of the article.
The discussion is based on my private source archive dated 20 February 2025. The diagrams and selected, abbreviated code excerpts explain the implementation without reproducing the private repository or its infrastructure configuration. I am describing the archived code, not a live deployment or measured production performance. Proposed improvements are identified as such.
Reading guide: The opening sections explain the application boundaries and state architecture. The middle follows the course catalog, checkout, media and progress paths. The later sections examine identity, localization, communications and operations, followed by a critical assessment of what I would change. Each diagram has a textual explanation so that the argument does not depend on the diagram renderer.
The product and its application boundaries
A learning platform has an obvious center: the relationship between a learner and a piece of educational content. In SiliconCodeCamp, the software around that relationship included a public website, a dedicated learning application, an administration dashboard, payment processing, video hosting, publishing tools and deployment infrastructure.
I kept the main applications in an Nx-oriented workspace. At the time of the archived source snapshot, the repository contained six applications and services, four shared TypeScript libraries, and a separate Firebase user-creation function. The root package manifest specifies Angular 19.1, NgRx 19 and Nx 20; the Next.js application has its own package manifest, and the two main Go modules declare Go 1.22.7 with a Go 1.23.3 toolchain. These are the versions visible in the final archived source, not necessarily the versions with which the project began.
apps/client— Angular learning application, course discovery, study experience, account and billing views.apps/dashboard— Angular administration application, course and content management, user operations and CDN publishing.apps/scc— Next.js public website and bilingual editorial content.apps/api— Go learner-facing API, progress, content authorization, payments and related services.apps/dashboard-api— Go administration API, course structure, media operations, publishing and migration tooling.apps/mta-sts-service— Go service for the email transport security policy.functions/on-create— Firebase Auth user-creation lifecycle function.
View full-size diagramDiagram source
flowchart TD
accTitle: Learner and administration applications use shared libraries and separate Go APIs. The APIs work with Firestore and external delivery services.
learner[Learner application] --> shared[Shared TypeScript libraries]
dashboard[Administration application] --> shared
learner --> learnerApi[Learner API]
dashboard --> adminApi[Administration API]
learnerApi --> db[Firestore]
adminApi --> db
adminApi --> catalog[Catalog publishing]
catalog --> learner
adminApi --> media[Video provider]
learnerApi --> media
learnerApi --> orders[Payment provider]
Logical view of the major application paths. The public site has its own editorial publishing model. Supporting email, logging and release infrastructure are omitted here and discussed later.
The separate applications had different responsibilities and deployment needs. The learner and administration applications did not have to share the same navigation or expose the same operations. Their APIs could have separate dependencies and release artifacts. The public website could use Next.js without requiring the learning interface to use React.
However, the repository was not a collection of fully independent microservices. Both main Go services worked with related Firestore documents. Their domain models overlap, and changes to the course structure could affect several applications. A monorepo helped keep the code together, but it did not remove those dependencies.
I would call it a multi-application product with distinct service boundaries. That description is more useful than debating whether it qualifies as microservices: the actual question is which parts of the system can change independently, and which need to agree before a change is safe.
A snapshot of the work
Counting Go, TypeScript, TSX, HTML, SCSS and CSS files under apps, libs and functions in the archived source gives approximately 78,000 lines across 594 files, excluding vendored dependencies and node_modules. That count includes templates, styles, generated or scaffolded material and code adapted from dependencies or starter projects. It is a description of the repository's size, not a measure of individually authored lines or engineering quality.
The more telling measure is the number of contracts that have to remain coherent. A learner can request a video only if the catalog, lecture record, access record and provider media reference describe the same reality. An administrator changing a lecture can affect all of them. A developer adding a field may have to account for the Go model, TypeScript interface, dashboard form, published JSON and existing stored documents.
The frontend: a workspace is not an architecture by itself
The Angular applications shared four libraries:
libs/
api-interfaces/ # Shared application-facing types
core-data/ # HTTP services and integration code
core-state/ # NgRx state, actions, effects, selectors and facades
environment/ # Environment configuration contracts
The division gave the UI a vocabulary for working with courses, sections, lectures, resources, users, progress and transactions. The administrative dashboard could consume related interfaces and data services while presenting a completely different set of workflows from the learner application.
Within core-state, the state slices distinguish administrative course management from the learner-facing catalog. There are separate domains for course, course-client, lecture, section, resource, progress-client, useraccess, transaction, auth and user. The distinction is important. The administrator's editable course record and a learner's published course representation are not interchangeable just because both are called a course.
Consider the catalog load in CourseClientFacade. The following is an abbreviated excerpt, retaining the relevant methods and selectors:
export class CourseClientFacade {
private readonly store = inject(Store);
allCourse$ = this.store.pipe(
select(CourseClientSelectors.selectAllCourseClient),
);
loading$ = this.store.pipe(
select(CourseClientSelectors.selectCourseClientLoading),
);
loadAll(): void {
this.store.dispatch(CourseClientActions.loadCoursesClient());
}
selectCourse(selectedId: string) {
this.store.dispatch(
CourseClientActions.selectCourseClient({ selectedId }),
);
}
}
The facade exposes state and intent. The corresponding effect responds to loadCoursesClient, calls CourseClientService.loadAll() through switchMap, and dispatches a success or failure action. A reducer and selectors then determine what the components see.
The actual data source is particularly interesting: the service reads the catalog from the CDN, rather than requesting a newly constructed course tree from the Go API for each visit.
// Abbreviated from CourseClientService.loadAll().
return this.http.get<Course[]>(
`${this.env.dataCdnURL}/silicon.json`,
);
View full-size diagramDiagram source
flowchart TD
accTitle: Learner catalog data flows from an Angular component through a facade and NgRx effect to a CDN-backed data service, then returns to the store and selectors.
view[Angular view] --> facade[Facade]
facade --> action[Load action]
action --> effect[NgRx effect]
effect --> data[Data service]
data --> cdn[CDN catalog]
cdn --> effect
effect --> result[Success or failure action]
result --> store[Reducer and store]
store --> selector[Selectors]
selector --> view
This arrangement gives the asynchronous operation a visible place in the application's state model. Loading, selection and errors can be observed from different components without every component creating its own independent fetch lifecycle.
It also shows where abstractions can become costly. CourseClientService has its own BehaviorSubject in addition to NgRx state. An empty catalog is treated by the effect as a failure rather than a potentially legitimate result. A simple operation can cross several files before it reaches a component. None of these observations invalidate the architectural pattern, but they expose the cost of applying it broadly.
Today I would keep one authoritative state representation for each shared domain and be more selective about global stores. Local interaction state does not need the same machinery as a learner's access record or a catalog used across several routes. An architecture that makes an important workflow predictable should not make every minor interface change laborious.
The two sides of a course editor
The administrative interface deserves more attention than it usually gets in a description of a learning platform. It is where the eventual learner experience is assembled. A course is not entered once and then left alone. Its author can add a section, reorder a lecture, correct an Arabic title, attach a resource, replace a recording or change which parts can be viewed without purchasing access. Each edit has a different scope, and each can interact with operations that are already in progress.
The CourseBuilderComponent in the dashboard reflects that distinction. It receives the course, sections, lectures and resources as separate inputs. It also receives independent loading observables for those domains. The component emits changes upwards rather than owning the persistence implementation. The surrounding course details view and shared state layer handle the work of getting the updated records back into the interface. It is a reasonably clear division between editing an arrangement and saving the domain objects that arrangement refers to.
The course builder's section ordering provides a small example of how those contracts work. When the course's sectionOrder is populated, the component maps each ID to the corresponding section object. The resulting array becomes the display order. When an administrator drags a section to another position, Angular CDK updates that local array and the builder emits an updated course containing the new sequence of section IDs. The important part of that change is an ordered list of identities, not a new set of sections.
// Simplified from the dashboard course builder.
moveItemInArray(orderedSections, previousIndex, currentIndex);
const sectionOrder = orderedSections.map(section => section.id);
const updatedCourse = { ...course, sectionOrder };
The separation makes it possible to reorder a curriculum without changing the identity of a section. It also reveals an invariant that the API and interface both need to enforce. A section order should not contain a foreign section, the same section twice, or an ID whose document has been deleted. The view filters missing references during ordering. That helps prevent an obviously invalid display, but filtering on the client cannot tell an editor whether content has actually disappeared or whether the application has received a partial set of records.
There is another interesting detail in the archived dashboard. The course builder has flags for reordering, updating a course and processing changes. It even checks whether a section is currently reordering by querying for a particular DOM class. I can see why a flag like that was useful for coordinating loading indicators across nested editors. As an architectural boundary, though, the DOM is a poor source of truth for whether a persistence operation is in progress. It describes what is rendered at one moment rather than which change has been acknowledged by the service. Today I would track that operation through explicit state, possibly scoped by the affected section or lecture ID. That would make the logic easier to test without creating a rendered document.
A useful distinction here is optimistic presentation versus optimistic persistence. Rearranging items immediately makes a drag interaction feel natural. The server still needs to acknowledge a specific change. If a request fails, the editor should either return to the last acknowledged order or retain the proposed order as an unsaved edit with a clear retry action. If two editors operate on the same course, the second request should not silently discard the first one's changes. A revision or compare-and-set mechanism would make that conflict visible. The source contains the ordering and update flows; a comprehensive conflict-resolution protocol would be additional work.
I would also avoid using a generic loading flag as confirmation that a particular edit succeeded. A loading stream can emit an initial value before a request begins, or change because a different operation finished. A mutation result associated with the submitted revision or request identifier gives the editor a more useful acknowledgement. It can distinguish the order currently on the screen from the order the server has accepted.
These are examples of the engineering work that remains hidden behind a normal course editor. A drag handle is only a few lines of markup. Keeping the editor, shared store, service and eventual public curriculum in agreement requires a much more deliberate contract.
The learner interface owns a different kind of state
The learner application has a different problem. Its course details view combines catalog data, authentication state, access information, progress and the current position in the curriculum. The archived DetailsComponent is a good place to see those concerns meet. Its IStep interface includes the course, section and lecture identifiers alongside section and lecture indices and their corresponding objects.
An identifier and an index are both useful, but they represent different things. An index answers where an item sits in the curriculum currently loaded by the browser. An identifier answers which item it is. The view uses one-based section and lecture query parameters to represent a position in the course. It expands the active section, updates the current step, clears the previous video URL and decides whether to request playback for the selected lecture. Navigation between steps updates that position without replacing the course's public identity.
The user can also arrive at a course before all the account-related data is available. A public or free lecture may be playable without a paid entitlement. A paid lecture requires a different path. The details view uses its current access state to determine whether controls should be available and whether to request a video. The Go service ultimately makes the playback authorization decision. The client-side checks provide immediate interface feedback; they should never be treated as the definitive access policy.
That distinction is useful when considering asynchronous changes. Imagine selecting a lecture, then immediately selecting the next one while the first video's authorization request is still in flight. The source clears the current URL and starts a new request when necessary, but the response handling in play writes to the component's URL when it completes. A route change or another selection does not necessarily cancel the earlier subscription. A slower response for an earlier lecture could therefore become visible after the learner has moved on. That is a plausible race inferred from the code, not a claim about a failure I observed in production.
The fix I would design today would tie the requested media representation to the current lecture identity. A switchMap over selected lecture IDs could cancel the previous observable subscription; a guard comparing the response's requested ID with the current selection could provide an additional invariant. A request sequence number would be another option. The key property is that a completed request must not gain permission to change a view merely because the request succeeded. It must still be relevant to the view's current state.
The same principle applies to cached results. The component stores authorized video URLs in a map keyed by lecture ID, with an expiry derived from the provider response. This reduces duplicate authorization requests during navigation. An account change, access revocation or visibility change may require invalidating such a cache earlier than its time-based expiration. Browser state is an optimization here; it should not become a permanent record of an entitlement.
I would break the details view into a smaller set of explicit responsibilities if I were revisiting this part of the product. A pure curriculum navigation model could compute the previous and next valid lecture. An access projection could explain which actions are available. A media session could own the current request, caching and invalidation. The Angular view could then focus on coordinating those pieces and rendering an understandable state. I would not introduce those boundaries simply to make a diagram neater. Each would correspond to behavior that can be tested independently.
There is also a product question behind those positional query parameters. If a learner bookmarks section two, lecture four and an editor moves a lecture into an earlier section, that position may identify a different lesson on the next visit. A position is convenient for an ordered navigation UI, but a stable lecture ID is usually a better long-lived reference. It would be reasonable to support old positional links as a compatibility format while generating identity-based links for new visits. The learner's progress already uses identifiers, so the two parts of the experience would then agree about what a lecture is.
The course model: what an administrator edits is not what a learner reads
The central content hierarchy was modeled as separate Firestore collections. Courses carried metadata and a sectionOrder array; sections carried their own metadata and a lectureOrder array; lectures carried a content type, visibility, duration and media references; resources were associated with individual lectures.
The ordering arrays were a practical part of the domain. A course has an intentional sequence. Relying on document creation time would make reorganizing a curriculum awkward. Explicit identifiers give the application a way to present an order that is independent of the database's storage order.
A simplified representation of the relationship is:
Courses/{courseId}
sectionOrder: [sectionA, sectionB, ...]
Sections/{sectionId}
courseID: courseId
lectureOrder: [lectureA, lectureB, ...]
Lectures/{lectureId}
courseID: courseId
sectionID: sectionId
contentType: video | text
visibility: public | free | paid
Resources/{resourceId}
lectureID: lectureId
Illustrative subset of the stored model. The implementation has additional fields, including localized text, publication status, provider references, pricing metadata and derived totals.
An administrator benefits from the separate entities. Updating a resource does not require rewriting the entire published catalog as an editing operation. The same decomposition is less convenient for public browsing. Resolving a course into its sections, lectures and resources takes more work than fetching one document.
The storage model and the access pattern therefore led to two representations of the same domain.
Reading a course as a graph of records
Consider a synthetic course with two sections, each containing a few lectures. A lecture can also have a resource attached to it. The administration service stores these kinds of entities in separate collections, and the resource service has its own create, read, update and delete operations. The resource creation path checks references to the course, section and lecture before creating a document. The individual document identifiers matter because the relationships must survive changes to a title or an ordering field.
View full-size diagramDiagram source
flowchart TD
accTitle: A synthetic course contains two ordered sections. Each section contains lectures, and a lecture can have associated resources.
course[Course] --> basics[Section A]
course --> advanced[Section B]
basics --> intro[Lecture A1]
basics --> practice[Lecture A2]
advanced --> example[Lecture B1]
practice --> resource[Resource]
Imagine moving the practice lecture to another position. The ordering changes; its identity need not. Deleting the lecture is different, because its relationships and the records that refer to it may no longer be valid. Updating a resource is different again: the learner's course hierarchy should remain intact, but the published representation may be stale until the next publication.
Those are three different kinds of change. Treating all of them as generic updates to a course object would conceal their effects. The administration service's separate course, section, lecture and resource operations make those effects easier to see, although the model still needs explicit integrity rules. Checking that three documents exist is not equivalent to verifying that all three form the intended parent-child relationship.
If I revisited this model, I would define which relationships are authoritative, then enforce them consistently in the editing API and in the catalog generator. For instance, a resource claiming to belong to a lecture in one section should not be published under another simply because all the referenced IDs happen to exist. An invalid graph should be diagnosed before a new catalog replaces the last good one. The examples in this article use synthetic content rather than actual course records.
Materializing the public catalog
In content.go, the Generator function retrieves courses whose status is not draft. It walks the course's explicit section order, each section's lecture order, and the resources related to those lectures. The resulting CustomCourse, CustomSection, CustomLecture and CustomResource structures contain nested public representations.
The important transformation is the explicit projection from internal models into a different set of structs. For example, the internal lecture model holds provider media GUIDs, while the public lecture representation has fields such as title, description, length, visibility and content type. A browsing interface does not need the internal media configuration in order to display the curriculum.
// Public catalog structures, abbreviated from the generator.
type CustomCourse struct {
Course Course `json:"course"`
Sections []CustomSection `json:"sections"`
ID string `json:"id"`
}
type CustomSection struct {
Section Section `json:"section"`
Lectures []CustomLecture `json:"lectures"`
ID string `json:"id"`
}
type CustomLecture struct {
Lecture Lecture `json:"lecture"`
Resources []CustomResource `json:"resources"`
ID string `json:"id"`
}
The administration API serializes this projection to JSON and uploads it to Bunny Storage as silicon.json. Plans are published through a separate endpoint as plans.json, ordered by their explicit Order field. The learner-facing data services read these files from the configured CDN.
View full-size diagramDiagram source
flowchart TD
accTitle: Administration edits Firestore records. A publishing operation builds a nested public catalog, uploads it to CDN storage and makes it available for browsing. User-specific operations remain behind the API.
dashboard[Administration] --> firestore[Editable Firestore records]
firestore --> generator[Generator and public projection]
generator --> json[silicon.json]
json --> storage[Bunny Storage]
storage --> cdn[CDN]
cdn --> learner[Learner catalog]
learner --> dynamic[Learner API]
dynamic --> firestore
This is a materialized read model in a fairly straightforward form. It is not a full CQRS implementation or an event-sourced architecture. It simply recognizes that the representation convenient for editing a course does not have to be the representation delivered to every reader.
For a catalog with courses indexed by i, sections by j, and lectures by k, the generator's database work grows with the number of courses, sections, lectures, and resources traversed. That work occurs at publication time in the catalog path. Consumers can then fetch a cacheable artifact, rather than repeatedly traversing those documents. I did not collect production read counts or latency measurements, so the benefit here is an architectural property, not a measured percentage improvement.
The approach leaves the personalized operations where they belong. A static catalog can tell someone that a lecture exists. It cannot tell them whether their individual purchase is valid, calculate their current progress or issue an authorized playback token.
Where publishing can go wrong
The most interesting weakness is in the generator's error handling. Several nested operations continue past failures: a section may be omitted after a lecture fetch fails, a lecture after a resource fetch fails, or a course after section assembly fails. That means a publication can potentially succeed with an incomplete hierarchy.
There is also no explicit artifact version in the visible silicon.json publishing path. The file is replaced under a fixed name, and the administration API exposes a cache-purge operation. Cache invalidation and successful object upload are distinct events; neither proves that every reader sees the same complete catalog at the same moment.
I would preserve the read-model idea but change its publication contract. An incomplete snapshot should fail validation before it becomes public. The release should be identifiable and reversible.
A possible revision would look like this:
1. Read and validate the complete course graph.
2. Generate a public artifact with a schema version.
3. Verify references, ordering and public-field allowlists.
4. Upload the immutable catalog under a versioned name.
5. Update a small manifest pointing to the validated version.
6. Retain the previous version for rollback.
The manifest approach is a proposed improvement, not something the archived implementation already does. Its purpose would be to make the publication boundary explicit, reduce the chance of exposing partial data, and make the consumer's view of a release easier to reason about.
As the catalog grows, I would also reconsider delivering the entire hierarchy in one file. A smaller index and independently cacheable course artifacts could reduce the initial payload and the amount of data invalidated by a single edit. Whether that is worthwhile depends on actual catalog size and access patterns.
Maintaining curriculum structure over time
Looking at the Go administration service makes the course editor's responsibilities more concrete. Creating a section does not only create a document. The section service updates its parent course's sectionOrder using a Firestore array operation. The lecture service performs a related update on its parent section when creating a lecture. Counters are also maintained. Those extra writes support the interface and public catalog, where repeatedly calculating the entire hierarchy for each view would be inconvenient.
The resulting data model contains both relationships and derived information. A section document identifies its parent course. A course's ordered list identifies the sections that are meant to appear in it. Counts describe the size of parts of the curriculum. That redundancy is useful as long as the representations agree. It also means the system needs a policy for repairing them when they disagree.
A particularly instructive path is deletion. PerformDeleteSection queries lectures that belong to the section and calls the lecture deletion routine for each one. After that it updates the course's section order and counter and deletes the section. The lecture deletion routine removes associated provider media when present, deletes resource documents, deletes the lecture and updates its parent's ordering and counters. The course deletion path extends the operation across the course's related entities and provider collections.
This is an explicit cascade implemented in application code. Firestore does not provide a relational database's foreign-key cascade for these separate collections, and an external video service could not participate in such a cascade anyway. The application is responsible for defining what happens to the related records.
Consider what a failed deletion means. A provider may successfully remove one video and then fail while removing another. A resource document might be gone while a subsequent counter update has not happened. An old public catalog may still contain the deleted lecture. Returning an error to the administrator is necessary, but it cannot reverse an external operation that has already succeeded. Retrying a sequence of mutations from the beginning also needs a clear definition of how to treat an already absent resource.
A more recoverable approach would begin by marking the course or lecture as pending removal. An authoritative desired state would prevent it from being newly published. A durable job could perform the external cleanup and record the outcome of each stage. Missing resources could be treated as successfully reconciled where appropriate, instead of making the job impossible to resume. Once the internal references, public publication and provider resources agree, the operation could be marked complete. Whether the underlying educational record should be retained for historical progress is a product decision that must be made before a destructive operation begins.
I would not implement a generalized workflow engine solely to delete one document. The value would come from recognizing that these operations already span several independently failing systems. Even a modest job record with explicit states and bounded retries would make those failures easier to inspect and recover from than a single request whose only result is success or failure.
The existing Calculate handler in course.go provides another view of derived state. It obtains the videos from the course's paid collection, processes videos with the completed status checked by the implementation, looks up their associated lecture records and updates length, processing status and storage size. It accumulates durations for sections and for the course itself.
The original durations are facts from the media provider. The course and section durations are application-derived summaries. They should not be treated as independently editable facts. In a future implementation I would calculate those summaries from an explicitly defined set of lecture representations and write the results together where possible. The archived handler performs a series of updates; an interruption can leave part of that result applied. I would also define how non-video lessons contribute, how unprocessed videos appear in an estimate and how a removed recording affects previously calculated totals.
There is a useful test hiding in the calculation: run it twice against identical provider metadata and the same curriculum. The resulting duration and storage summaries should not change merely because the job was repeated. Then simulate a course with no processed videos or a section whose last recording was removed. The output should not preserve obsolete totals from a previous run. Those cases are more valuable than measuring the execution time of an ordinary successful calculation without knowing whether it is correct.
The broader lesson is that denormalization buys fast and convenient reads by introducing a maintenance responsibility. If I keep derived counters, ordering arrays and published projections, I also need clear ways to reconstruct and validate them. I should not need to manually inspect every document to recover from a failed edit.
Payment processing: the order and the right to learn
Payment processing is one of the places where software stops being a self-contained application. A third party can notify the system about a charge, refund or dispute at a different time from the learner's original interaction. The local state has to reflect what those events mean for the product.
SiliconCodeCamp used PayPro Global as the payment provider. The learner API creates a pending transaction and prepares checkout data with application-specific references. The code validates the configured course, purchase availability, price and the user's existing access before constructing the checkout link. It also carries the local transaction, learner and course references through the provider's custom fields, along with discount configuration where applicable.
This gives the return path something to correlate with an existing local record. It is more reliable than attempting to infer a purchase from a learner's email address alone.
Two collections express different responsibilities:
Transactions— The local record of a purchase attempt and the subsequent provider order state.UserAccess— The course identifiers available to a learner and subscription-related access information.
The first is a record of a commercial event. The second is a projection used to decide access. The media service can inspect a learner's access without having to replay every historical payment event on every video request.
Following an order through the system
View full-size diagramDiagram source
flowchart TD
accTitle: Checkout creates a pending transaction and a provider notification later updates the payment record and course access.
request[Learner requests checkout] --> lookup[API reads course and access]
lookup --> pending[Store pending transaction]
pending --> checkout[Provider checkout]
checkout --> notice[Provider notification]
notice --> validate[Validate and retrieve order]
validate --> transaction[Update transaction]
transaction --> access[Update course access]
The diagram describes the implemented integration path. It does not assert that every provider event is successfully delivered or processed.
The webhook handler dispatches notifications for charged orders, refunds, chargebacks, declined orders and successful chargeback disputes. Its handlers retrieve order details from the provider, recover the local identifiers from custom fields and apply the corresponding updates. The stored transaction contains information relevant to the purchase and its state, including provider order identifiers, status and billing metadata.
- Order charged — Mark the transaction charged and grant the course.
- Order refunded — Record the refund and remove the corresponding course access.
- Chargeback — Record the chargeback and remove the corresponding access.
- Order declined — Record the unsuccessful payment.
- Chargeback dispute won — Update the transaction and restore the corresponding access.
The design also contains plan and subscription models, but the main checkout implementation in the archived learner API constructs one-time purchases. The fact that subscription validity can be checked by the media service is not proof that a complete recurring billing lifecycle was implemented. I would keep that distinction visible in both the product documentation and the code.
The consistency problem behind a successful payment
The charged-order handler writes the transaction and user access in separate operations. It appends the course identifier to the access record. That creates several cases that deserve independent tests: the provider can deliver the same notification again; the transaction update can succeed while the entitlement update fails; notifications for related changes can arrive out of order; two independent operations can try to update the same access document.
It also exposes a modeling limitation in storing an array of course IDs. An access record that represents only the final set of accessible courses cannot necessarily explain why access exists. If more than one purchase or another entitlement source grants the same course, revoking one source should not remove the remaining valid grant.
For a new implementation, I would consider a record per entitlement source, and treat the user-facing access set as a projection. Each payment event would have a stable identifier, processing state and association with the local purchase. Applying a validated event would update the relevant order and entitlement state within a well-defined transaction where possible. An explicit reconciliation process would compare local state against provider records when delivery fails or an unexpected transition occurs.
The following is a proposed testable design, not a claim about the original handlers:
Payment event
-> Verify authenticity and correlation
-> Persist event identity if not previously processed
-> Validate the allowed order-state transition
-> Apply the order and entitlement changes atomically
-> Mark the event processed
-> Reconcile or retry on failure
A payment provider and a database cannot participate in an ordinary local transaction together. The goal is not to pretend that distributed failure has disappeared; it is to define the local invariants and the recovery path clearly enough that the product can converge to the correct state.
This is also where the naming of business states matters. charged, refunded and chargeback mean different things from accessible. One should not become an accidental substitute for the other.
What the customer sees after checkout
A payment integration does not end when the external checkout page redirects back to the application. The learner needs a way to understand whether an order is pending, charged, declined or refunded. The administrative side needs to understand why access exists, and the service must keep the decision separate from what the browser happens to display after a redirect.
The learner API includes a dedicated transaction query in transaction.go. It obtains the authenticated user ID, checks that the corresponding user exists, and queries transactions belonging to that user. It projects the result into records with status, dates, provider order information, billing totals, currency and invoice references where those values are available. A newly initiated order does not necessarily have all the fields of a completed one. The implementation handles several of those missing values explicitly and uses a pending default for the transaction status.
This is a small read model of its own. The UI needs the history of transactions relevant to the account, not the entire provider response or every internal field used during payment processing. The boundary also prevents a transaction query from relying on an arbitrary customer ID provided by the browser. The identity comes from the verified request context. A properly scoped history query is useful even when the underlying storage model is being changed.
I would strengthen that model by representing money with its currency and an exact decimal or integer minor-unit representation rather than making floating-point arithmetic the basis of billing decisions. The archived transaction projection reads a floating-point billing total. That is adequate as a display conversion in many cases, but it is not a good foundation for reconciliation or calculating financial amounts. I would keep the provider's original monetary representation where possible and define exactly how rounding works at the application boundary.
The transaction reader also illustrates the trade-off between typed domain models and flexible Firestore maps. Direct assertions on stored values are concise when every historical document matches the latest schema. They become brittle when a value is absent or arrives with a different type. A typed decoder or explicit conversion layer can distinguish incomplete pending orders, legacy records and truly invalid values. It can return a useful error rather than treating the entire account history as unreadable because of one unexpected field.
There are several different notions of time in this workflow. The local transaction can be created before the provider assigns its final order ID. A provider can record a charge before the webhook is delivered. The application can receive an update after a learner opens the confirmation page. A later refund may refer to the same underlying purchase. Recording both when an event happened and when it was processed would help distinguish an old event arriving late from a new change in the provider's state.
For a future version, I would design the confirmation experience to display pending as a legitimate result rather than interpret a successful browser navigation as proof of purchase. It could refresh the relevant transaction and entitlement state without blocking the entire application. If the provider reports success but access has not yet been applied, the system could offer a clear reconciliation path. The UI should not pressure the learner to buy again just because notification delivery is delayed.
The administrative interface complicates the entitlement model in a useful way. The dashboard exposes separate operations for managing a user's courses and updating subscription information. That means a valid course grant can originate from something other than the payment handler. A simple list of accessible course IDs cannot necessarily explain which purchase, administrative decision or subscription caused each entry to exist.
This is why I would make entitlement provenance an explicit part of the future model. A grant would have a subject, a scope, a source and a lifecycle. The effective access set could be derived from all active grants. A refund would revoke the grant associated with that particular order, not blindly remove access granted by a different source. An administrator could see why a learner has access and which action would actually change it. The current code separates payments and access; the proposed provenance model would make the relationship more precise.
One further improvement would be a reconciliation routine with a deliberately limited scope. It could examine local transactions that have remained pending for an unusual period, obtain current provider information, compare it with the stored state and apply the same transition logic as an ordinary notification. That operation would need to be idempotent and auditable. It would also need to avoid exposing payment details to a user who does not own the underlying account. I would prefer a small reliable reconciliation operation over a complicated event architecture that cannot explain its own disagreements.
Media infrastructure: a lecture is not a video file
I used Bunny Stream as the media service, with separate configured libraries for public, free and paid video. Courses have corresponding collection references, and lectures can hold different video GUIDs for those visibility categories. The administration API handles provider objects; the learner API handles the access decision and returns the playback information appropriate to the chosen media.
That separation avoids making the learner API carry video data. It also means the application does not own every aspect of encoding, streaming or media processing. It owns the connection between educational content, visibility, learner access and the externally managed asset.
Creating and uploading media
The dashboard API creates media objects and issues the upload information required by the provider. The dashboard includes TUS-based resumable upload handling. Large video files can be transferred to the media service without the Go API becoming the intermediary for the entire upload. Media metadata, length, processing status and storage size can subsequently be retrieved and associated with the lecture.
There is also a course calculation operation that inspects video metadata in the configured paid collection. It updates lecture metadata and aggregates duration into section and course records. Those totals are then available to the rest of the application. That is an example of an operational reconciliation action: provider state and application state do not become identical merely because a media object has been created.
A visibility change is an external operation
One of the more unusual parts of the archived source is in lecture.go. When a lecture's visibility changes, the code first checks whether the video already has a GUID in the destination visibility category. If it does, the existing representation can be reused. Otherwise, the implementation includes a path to fetch the media into the appropriate provider library and save the new reference.
That means the update from paid to free, for example, is not always a simple change to the lecture's metadata. There may be an external media operation and a new provider identity involved.
View full-size diagramDiagram source
flowchart TD
accTitle: Changing video visibility may reuse an existing destination media reference or request a provider-side fetch before updating the lecture record.
start[Requested visibility change] --> ref[Check destination reference]
ref -->|Exists| reuse[Reuse existing reference]
ref -->|Missing| fetch[Request provider-side media fetch]
fetch --> result[Check operation result]
result -->|Success| save[Store destination reference and visibility]
result -->|Failure| fail[Report or reconcile failure]
reuse --> save
Simplified description of the media-reference branches. The original implementation does not have a complete durable job state machine; the failure branch expresses the behavior I would require from a revision.
This design creates an important distinction between the desired visibility of a lecture and the ready media that can serve it. A provider can accept an operation without completing its encoding. A database write can fail after an external asset was created. A previous asset may remain in its original library. Those situations cannot be resolved by merely wrapping the final Firestore update in a transaction.
I would model a media change as a durable operation with explicit states such as requested, processing, ready and failed. Publication of the new visibility should depend on readiness and verified configuration. Retrying a job should not create unbounded duplicate assets. Cleanup should be a separately recoverable operation, not something assumed to succeed as part of an ordinary record update.
The same reasoning applies to course creation and deletion. The source creates collections in three media libraries during course creation, and the deletion path traverses associated educational records and media resources. When several external operations are involved, each can succeed independently. A reconciliation tool that identifies orphaned assets, missing references and partially completed operations would be worth the effort.
Authorizing playback
The learner API's Token handler starts from a lecture ID and loads the authoritative lecture record. It rejects non-video content. Its public and authenticated paths distinguish the lecture's visibility and the appropriate media reference.
For protected paid content, access depends on an explicit course grant or a subscription flag with dates that contain the current time. Public and free video references have their corresponding paths. If the conditions are met, the service returns the provider embed authorization information instead of transferring the video itself.
- Public — Public visibility and a public media reference.
- Free — Free visibility and a free media reference.
- Paid — Authenticated learner, course access or an active date-valid subscription, and a paid media reference.
These are conditions in the application code. Actual protection also depends on the provider's token enforcement, configured library permissions, application identity checks and the deployment environment. I have not independently verified those historical settings.
The valuable architectural boundary is between catalog metadata and authorization. A CDN document can expose the existence and description of a lecture without being responsible for authorizing the underlying protected asset. A purchase modifies the user's access; the playback request consumes that access decision. The player need not understand payment notifications or resolve provider disputes.
For a revision, I would isolate authorization into a small pure policy function that can be tested with a matrix of visibility, identity, entitlement, subscription dates and media readiness. The token adapter would then act on a successful policy decision. It would be easier to audit than reproducing business conditions across handlers and interface components.
The browser and the external player
The final part of media delivery is still an application integration. The learning interface does not simply display a static video tag. It obtains an authorized representation from the content service and constructs an embedded player URL from the returned library identifier, video identifier, token and expiration. Angular's resource URL trust API is then used for that iframe source. In the archived component, the URL's origin is constructed from a fixed provider host rather than supplied as an arbitrary address from the server.
That boundary deserves to remain narrow. Trusting an iframe resource is different from trusting text or an ordinary hyperlink. A future refactor should validate the response's identifiers and expiry before constructing the URL, and continue to constrain the allowed origin. It should not turn that small exception into a general helper that bypasses Angular's URL security for whatever string a caller passes in.
The CourseVideoPlayerComponent also listens for messages from the embedded player. It expects time updates, pause, play and end events. It checks the sending origin against the media provider's origin, then uses the event type to decide how to present its controls. During playback, the navigation overlay can be hidden and then revealed near the beginning or end of the recording. The code includes touch interaction timeouts, keyboard navigation while interacting with the player, and cleanup of its event listener and timers when the component is destroyed.
These are implementation details worth recording because an embedded media player is a separate browsing context. It does not share ordinary Angular component events with the application. The browser's message interface is the integration boundary. The original implementation checks the sender origin and broadly checks that the message data is an object. I would additionally check that the sending window is the current iframe, that the payload matches a known schema, and that its time and duration values are finite and sensible. That would make it easier to reason about messages from old or unrelated frames as the user navigates between lessons.
// Proposed message boundary, not an excerpt from the archived code.
function isCurrentPlayerEvent(
event: MessageEvent,
frame: HTMLIFrameElement,
allowedOrigin: string,
): boolean {
return event.origin === allowedOrigin &&
event.source === frame.contentWindow;
}
That check would be only the beginning of validation. It establishes the expected sending context; it does not establish that the payload represents a valid time update. Keeping the two checks separate makes it clear which part of the protocol each protects.
The player messages should not be used to prove a learner's entitlement or establish authoritative course completion. A playback event can inform the interface that the next lecture may be a useful action. The decision to mark an educational item complete depends on the product's progress semantics. If the system ever supports formal assessment, that assessment would require its own evidence rather than treating a message reporting a video position as an exam result.
The archived design also caches the signed URL and reduces the cache's lifetime relative to its provider expiry. That is a thoughtful attempt to avoid unnecessary requests and stop reusing a URL close to its expiration. It would still be worth separating the lifetime of the playback token from the lifetime of the learner's account state. If an entitlement changes while a token is valid, the provider token may remain usable until its own expiry, depending on the integration's configuration. A shorter expiry reduces that window but increases token issuance requests and the chance of interruptions. I would choose the policy based on the actual media provider contract and the user experience, not simply make every token expire as quickly as possible.
There is a natural performance boundary here too. Serving video traffic through a dedicated media provider avoids making the application API responsible for every byte of a recording. The API still needs to be available when it issues or renews playback authorization. This means a media provider can be healthy while the product cannot authorize a new paid lesson, or the API can be healthy while the player cannot load. Distinguishing those failures in error messages and operational logs would make diagnosis far easier. The user should not see the same unexplained loading spinner for an expired entitlement, an unavailable provider and a failed network request.
Learner progress: when the curriculum itself is mutable
A course is not an immutable collection of videos. Lectures can be added, removed or reorganized. A learner can complete a lecture, mark it incomplete, return to a previously studied course or clear progress. The application needs a definition of completion that remains understandable as these changes occur.
The archived progress model stores a per-user document in CourseProgress. It contains enrolled and completed course identifiers and a collection of per-course progress records. Each record includes completed lecture IDs, completed section IDs, a completion flag and a calculated percentage.
In progress.go, the Update operation verifies the learner identity and checks that the lecture belongs to the requested course. It then updates progress within a Firestore transaction. The transaction reads the current course and lecture, reads the relevant section and progress document, adds or removes the lecture identifier, determines section completion against lectureOrder, and calculates the course-level summary.
The underlying rule for a section is easy to state independently of the storage technology:
A section is complete if all lecture identifiers in its current
lectureOrder are present in the learner's completed lecture set.
The implementation additionally derives a percentage from the number of completed lectures divided by totalLectures. These summaries are useful for rendering a course card or a learner's personal library without recalculating all the underlying data in the browser.
A transaction protects the update against certain concurrent changes, but it cannot decide what the product should mean by completion. Suppose a learner finishes a course with ten lectures and an administrator subsequently adds two more. Is the learner still a graduate of the course? Is their progress now 83%? Should the completed version be preserved while the new version is available to study?
There are several reasonable answers. The archived implementation derives completion from mutable course and section structures and retains some previously calculated summaries. It does not expose a fully specified curriculum revision model. That makes stale completion state, obsolete identifiers and a changed denominator important cases to examine.
I would also reconsider the scope of a progress document. A single document per learner makes it convenient to retrieve the entire learning history, but as that history grows, unrelated course updates contend for the same record. The size of that record also grows with the number of enrolled courses and completed lectures. Splitting records by learner and course could allow independent updates and more bounded reads. A separate summary could be maintained if the interface needs an overview of all courses.
A possible next model would separate durable completion facts from their interpretation:
- Lecture completion — A learner has completed a particular lecture identity.
- Course revision — A published set of required lectures and their organization.
- Progress projection — A derived view of completion against a selected revision.
- Completion history — The revision against which completion was recorded, where the product needs that information.
This is not a requirement for every learning application. It is an example of how choosing the right domain concept can simplify a problem that otherwise appears to require more synchronization code. The actual decision would depend on whether SiliconCodeCamp wanted to recognize completion historically or always against the current curriculum.
Identity, provisioning and the administration boundary
There are two different questions in the request path: who is making this request, and what is that identity allowed to do? SiliconCodeCamp uses Firebase identity verification and App Check middleware. The learner API has a content-specific middleware path that allows requests without a user identity where the content supports public access, while still checking the App Check token. Routes requiring a learner identity verify the Firebase ID token and check revocation. The dashboard API initializes a separate configured dashboard Firebase identity context and applies its authentication and App Check middleware at the routing layer.
That separation is helpful, but App Check is not a replacement for authorization, and authentication in a separate identity project does not by itself demonstrate that every administrative permission is enforced correctly. A production security review would need the actual Firebase project configuration, account provisioning rules, cloud IAM policies and provider settings, not just the middleware implementation.
The repository also contains a Firebase user-creation function. When an identity is created, the function prepares initial records for Users, CourseProgress and UserAccess, and writes them in a Firestore batch. A welcome email through ZeptoMail is attempted separately from the batch. The code explicitly distinguishes an email failure from a failure to create the user records.
This is an interesting boundary because identity creation and application provisioning are not quite the same operation. A Firebase account may exist before its associated application documents are ready. A reliable onboarding flow has to tolerate that interval.
The use of a batch gives the three initial document writes a common commit boundary. It does not make the identity event, Firestore commit and external email delivery one transaction. I would make the provisioning operation idempotent and ensure a retried identity event cannot overwrite existing progress or access records. For messaging, I would consider a durable outbox or equivalent retry mechanism if delivery were important enough to justify it. Otherwise, an email could remain best effort, with that limitation made explicit.
This is also a useful place to review the data lifecycle. Payment records, identity data, learning history and operational logs have different reasons to exist and different retention requirements. The repository establishes storage and integration mechanisms, but it is not evidence of a verified privacy or regulatory compliance program. Those requirements would need a separate review before any relaunch.
The administrative view of people and permissions
The dashboard also includes a user management area that brings several data domains together. UserListService consumes the user, course and user-access facades, enriches the user records with their access information, and builds observable views for filtering, sorting and statistics. It has a separate view state for search, pagination, sort direction and access-related filters. The visible statistics concern account and entitlement information rather than the underlying payment integration alone.
The dashboard constructs this read model in the browser rather than publishing it to a CDN. The administrative screen combines records that are owned by distinct parts of the application. It is useful for inspecting which accounts have course access, which have subscription information and how a chosen subset of users relates to the catalog. Dedicated dialogs support course management, access changes, subscription updates and sending messages. The service also contains export-related functionality in the user feature area.
The implementation enriches users by searching the access array for each user ID. That is straightforward for a small collection and easy to read, but the amount of work grows with both arrays. A map keyed by the user identity would make the join more predictable. For larger collections, I would move filtering and pagination to an appropriate server-side query rather than load everything and only paginate the result in the browser. That is not a claim that the archived code failed under load; I do not have such measurements. It is an observation about the work performed by the implementation as the dataset grows.
Client-side aggregation introduces a separate question about authority. A dashboard can display a count of accounts with active subscriptions based on the records it loaded and its definition of active. It cannot establish that the records are complete or that their dates and state agree with the policy used by the learner API. I would define those business concepts once and use a consistent evaluation time. If the displayed number represents a filtered subset or potentially stale data, the interface should make that interpretation clear.
Administrative access changes deserve a more careful contract than ordinary display preferences. Adding a course to a person's account and removing one should be traceable to the actor, time, reason and source of the operation. Updating subscription dates should not silently change unrelated grants. These are possible improvements to the existing management endpoints, not claims that the archived product already had a complete auditing subsystem. The design needs to be proportionate to the consequences of an action, even when the only administrator is the developer of the product.
There is also a practical separation between an identity record and an educational account record. Firebase Auth may know that a person can sign in. The application needs its own profile, access state and learner progress to make the account useful. The dashboard's administrative view brings some of that information together, but it should not make the existence of one record proof that every other record has been provisioned. I would make missing dependent records a recognizable administrative condition with a safe repair operation.
The lifecycle of an API request
The source defines different request paths for ordinary authenticated operations, application verification and content authorization. The learner-side middleware verifies Firebase identity tokens, checks revocation where specified, and places the verified user ID into the Gin context. Separate App Check verification evaluates the application token. The content middleware accepts a request with a verified application token and conditionally verifies a supplied identity token, allowing public playback requests and authenticated playback requests to share the relevant handler.
The distinction between app identity and user identity matters. A successful App Check verification does not grant someone a course. A valid user identity does not itself establish course access. The media authorization path still needs the lecture's policy and, for paid content, the applicable entitlement. Those checks address different questions and should remain independently understandable.
The learner API and the dashboard API also have distinct middleware and route configuration. Separate applications can make it easier to understand which operations belong to an administrator. They do not automatically establish the security of those operations. Every administrative route still needs the intended authorization policy, and the cloud service account needs permissions appropriate to that service. A route with the correct path name is not protected merely by its position in a different repository directory.
I would revisit the service error contract alongside those boundaries. The archived API often returns structured responses containing an error code and a message, and many Angular services expect that shape. An application-specific error code can be useful for translating a business failure into an interface state. The HTTP status still matters to tooling, intermediaries and clients. I would make their meanings agree: an invalid request, a missing account, an unauthorized operation, a dependency outage and an unexpected internal error should not all look identical to an automated client.
At the same time, error messages intended for a developer and messages appropriate for a learner have different requirements. The application should avoid returning private integration configuration, raw provider responses or infrastructure details unnecessarily. A safe request identifier can connect a user-facing error to more detailed server-side diagnostics. For a workflow with several external calls, a consistent identifier would be more useful than a collection of unrelated log messages. The code has logging and response utilities, but a complete end-to-end correlation scheme would require deliberate implementation and testing.
What I value about reviewing these paths together is that the security boundary becomes part of the domain design. The application does not merely ask whether a request is authenticated. It asks which operation is being attempted, which resource is involved, which identity is relevant and which state makes the operation permissible. That is a better basis for an authorization test suite than a single successful sign-in test.
The account area and the boundaries of a finished feature
The learner application was more than the academy route. It contained account settings, security settings, a billing view, a personal learning area, and a help center. These screens are less visually interesting than a course player, but they expose the state a learner needs to understand after a purchase or a change to their profile.
The account settings component initializes a form from application state, obtains a list of countries, validates contact information, and sends an update through the user facade. It disables editing of the account email in that form. A separate security screen delegates password changes through the authentication facade. These are reasonable boundaries: the data used to contact a person, the identity used to authenticate them, and the credentials used to prove that identity are related but not necessarily interchangeable.
The billing view obtains transaction history from the transaction facade, sorts it by creation date, and presents a paginated view with access to invoice links and copyable references. Its paginator also reacts to language changes. The billing screen is a presentation of financial records, not the authority that decides whether a learner has access. That distinction matters when a transaction is pending or when an operator has granted access independently.
View full-size diagramDiagram source
flowchart TD
accTitle: Account, security and billing screens rely on distinct state domains. Access decisions remain separate from the display of transaction history.
settings[Account area] --> profile[Profile settings]
settings --> security[Security settings]
settings --> billing[Billing history]
profile --> user[User state and API]
security --> identity[Authentication state]
billing --> transactions[Transaction state and API]
transactions --> history[Invoice and order information]
grants[Access records] --> playback[Playback authorization]
The archived code also contains a notification settings screen with a local reactive form. Its component initializes toggle values, but I do not see a persistence operation in that component. I would not describe that screen as a fully functioning notification preference service. It illustrates an important distinction in a large repository: an interface can be present without the corresponding workflow being complete.
A useful release test for account features would exercise the write, refresh the page, and verify the returned state. A toggle that changes visually is not enough. Similarly, a billing page that renders with sample transactions does not establish that the payment provider, database and entitlement records agree. The tests should start at the screen and follow the operation to the system that owns the result.
Bilingual content is a data problem as well as a presentation problem
SiliconCodeCamp contains two related, but distinct, publishing systems. The public Next.js website has English and Arabic MDX articles, language-aware routes, dictionaries, fonts, a sitemap and an RSS route. The course catalog is managed separately through Firestore and the administration publishing pipeline.
An editorial post and an interactive course have different structures. A post is authored as a document. A curriculum contains ordered entities, media references, access rules, progress associations and administrative metadata. MDX is appropriate for the former; the latter benefits from a structured representation with stable identities.
The Go course models contain localized values for titles, descriptions and other educational metadata. The public catalog projection carries localized fields into the learner application. The Angular application also contains its own language service and Transloco integration. Localization is therefore represented at several boundaries: the content model, the generated catalog, the learner interface and the public editorial site.
For Arabic, a translated string is only one part of the experience. Directionality affects layout and navigation. Mixed Arabic text, English technical terminology, source code and numbers need particular care. A course may have an original teaching language independently of the interface language selected by the learner. A language-aware system should not collapse those two properties into one flag.
There are practical contract questions I would formalize in a future revision. Which fields must exist in every supported language before a course can be published? Is an untranslated field allowed to fall back to English? Does changing the interface language preserve the identity of the currently selected lecture? How should a localized slug change affect existing links? These are content and product decisions that should be reflected in the publishing validation rather than left to arbitrary component behavior.
I would keep the editorial site and structured curriculum models separate. What they can usefully share is a small set of localization conventions: supported locales, direction, fallback behavior, typography and rules for displaying mixed-direction content. That does not require the two applications to use the same rendering framework.
Keeping a language preference across two applications
The bilingual implementation extended beyond translated content. The public website uses locale-prefixed routes; the Angular learner application uses its own routing and translation service. The repository contains a small mechanism to keep language preferences coherent between the two browser applications: both use the same named language-preference cookie on their shared parent domain.
The Next.js middleware recognizes an explicit English or Arabic route and updates the cookie accordingly. For an unprefixed route, it tries the cookie, then negotiates a supported locale from the request's language header, with Arabic as the default. It redirects to a locale-prefixed URL while exempting certain public resources from that behavior. The Angular language service initializes Transloco from the saved preference when running in the browser and updates the cookie when the preference changes. It has a separate server-side fallback to the default language.
View full-size diagramDiagram source
flowchart TD
accTitle: The public site has explicit localized routes and shares a language preference with the learner application through a browser cookie.
route[Localized public URL] --> next[Next.js locale middleware]
header[Browser language preference] --> next
cookie[Shared language cookie] --> next
next --> page[Arabic or English page]
next --> cookie
cookie --> angular[Angular language service]
angular --> translations[Transloco and learner interface]
angular --> cookie
This is a modest integration with a noticeable product effect. A person who chooses Arabic while browsing the public site should not have to repeat the choice upon entering the learning application. It also illustrates the limits of sharing browser state. The cookie communicates a preference, not an authenticated identity or authorization decision. In local development, server rendering, custom domains and privacy-restricted browser contexts, a cookie may be unavailable or behave differently. A fallback is essential.
There are refinements I would make. The Angular service accepts a saved string without the same supported-locale check visible in the Next.js middleware. The domain calculation assumes a simple parent domain. The language-header cleanup in the public middleware discards quality parameters before negotiation, which can change how an ordered preference list is interpreted. A shared locale specification and tests for the same requests in both applications would help preserve consistency without forcing both frameworks to share their rendering logic.
The harder localization work remains in the content. Switching the interface should not accidentally change the meaning of a course's original teaching language. A missing translation should have an explicit fallback, and a language-switching link should keep the reader at the corresponding article when one exists. These are product contracts, not just translation keys.
Schema evolution and the work that does not appear in a demo
One of the least visible parts of developing a product is keeping old records compatible with new code. Firestore's flexible document model is convenient during iteration, but a collection can gradually contain records created under several assumptions about field names, types and required values.
The repository includes migration functions for UserAccess, courses, sections, lectures and resources in the administration API. Some use Firestore's BulkWriter to update documents, and the source contains utilities for converting localized fields and removing obsolete subscription-related fields. This is more useful evidence of the model's evolution than a diagram of the final schema alone.
The migration functions are not a complete versioned migration framework, and the migration route registration in the dashboard startup code is commented out. I would not infer that every migration was run against production, or that there was a safe rollback for each one. What the code demonstrates is that the model was evolving and that some explicit tooling was written to accommodate it.
For a relaunch, I would want migrations to be repeatable and observable. Each migration would declare the source and target schema versions, validate its preconditions, produce a dry-run summary, and record enough information to resume or diagnose a failure. A migration that encounters an unexpected document should report that fact instead of silently converting it to a default value that loses meaning.
The published catalog gives this process an additional responsibility. A migration can change internal documents without immediately breaking the public JSON contract, provided the generator understands both shapes during the transition. That is an advantage of the separate projection. It also means a migration and publication can disagree if their compatibility assumptions are not tested together.
The practical lesson is to treat persisted data as a long-lived interface. Changing a TypeScript interface or a Go struct is easy compared with changing all the records that previous versions of the software created.
Maintaining an editorial site alongside an application
SiliconCodeCamp's public site is useful to discuss separately from the curriculum because its content follows a different publication lifecycle. The Next.js application contains language-specific routes, dictionaries, MDX utilities, blog filters, pagination, sitemap and robots handlers, and an RSS endpoint. It reads editorial content in a form suited to publication with the website, whereas the learning catalog is generated from editable records and delivered separately.
It would have been possible to place all public content in the course database or all learning material in the source repository. Neither choice would necessarily be a good fit for both types of content. A technical article has headings, code, metadata and a route that ideally remains stable after publication. A course has editable sections, media references, access rules and operational changes that may not require a new application build. Their identities, permissions and update patterns differ.
The public site uses the language as part of its route structure. The archived feed handler loads posts for Arabic and English, combines them and sorts them by publication date. It generates a link containing the language and post slug and includes descriptive metadata and content in the feed. This is useful infrastructure for discovery, not a separate copy of the site's editorial database. Its output is derived from the same source articles.
A small detail worth revisiting is the feed item's identity. The source uses the post slug as its GUID even though the item URL also includes the language. If corresponding translations share a slug, their feed identifiers may collide. A stable identifier containing the language or a canonical article identity would avoid that ambiguity. Similarly, the product would need a clear choice between one mixed-language feed, separate feeds, or a combined feed that labels each entry appropriately. The archived code implements the combined approach; those alternatives would be product decisions for another version.
MDX also deserves a clear trust boundary. It is convenient when the site's author wants to embed a purpose-built component in a technical article. That convenience relies on the publication source being trusted. I would not accept arbitrary user-supplied MDX and compile it as executable application content. If the product gained a public authoring feature, I would use a restricted content format with explicit rendering and sanitization rules. For a developer-maintained editorial repository, the trust assumptions are quite different.
I would also test the publication outputs as a family. When an article's title changes, the listing, article metadata and feed should agree. When a language version does not exist, the corresponding navigation should not imply that it does. When a slug changes, the old URL needs a migration policy. A sitemap is a list of intended public identities, not simply a list of every possible path the framework can resolve. These details are relevant even for a small website because they affect whether shared links remain useful over time.
This is an area in which the old project has an obvious relationship to my current personal website. Both have a distinction between editorial content and its presentation, but they solve it with different mechanisms. The learning platform's public site used Next.js and MDX; my personal site uses a different content build and multi-edition Angular presentation architecture. I would choose between those approaches based on the requirements of the next project rather than assume that a newer stack automatically represents an improvement.
Email, support and the newsletter as product infrastructure
Two additional paths in the learner API are easy to overlook: support submissions and newsletter subscriptions. Together with the welcome-email function and the administrative mail integration, they form a communication layer around the learning experience. Unlike a course lecture, a message has its own delivery lifecycle and can leave the system through several independent providers.
The support handler validates the submitted name, email, subject, message and language. It uses Unicode character counts for text length validation, which is relevant for Arabic as well as English. It stores the request in Firestore and then attempts to send a confirmation using a language-specific transactional email template. If that email fails, it logs the failure but still reports a successful support submission. This order is significant: the durable support record and the delivery of a confirmation are separate outcomes.
View full-size diagramDiagram source
flowchart TD
accTitle: A valid support request is saved before the confirmation email is attempted. The original request survives an email failure.
form[Support request] --> validation[Validate input and language]
validation --> record[Save support record]
record --> template[Choose language-specific template]
template --> email[Transactional email provider]
email -->|Delivered or accepted| done[Confirmation attempted successfully]
email -->|Error| log[Log delivery failure]
record --> response[Successful submission response]
A future implementation could represent confirmation status explicitly. A retry should not create duplicate support records, and the confirmation should not be sent indefinitely if a downstream service is unavailable. A small outbox written alongside the request would make the separation observable. For a low-volume product, however, simply saving the request and exposing failed confirmations to an operator may be sufficient. The right design depends on how important the email is to the workflow.
Newsletter subscriptions follow a different path. The public website includes a submission hook with loading and error state. The backend validates the subscriber and selected topics, chooses the corresponding English or Arabic mailing list, and submits the requested topics to Zoho Campaigns. The handler has a Firestore client parameter, but the subscription path itself delegates to the campaigns integration rather than persisting a local subscription record. A confirmation-email block is commented out. I would describe this as an integration with an external subscription provider, not a fully implemented internal mailing-list database or a completed confirmation workflow.
There is also a distinct token-management problem. The campaigns client holds an access token and expiry in memory, protects its refresh operation with a mutex, and attempts to persist updated configuration to Secret Manager. If that persistence fails after the provider returned a new token, the current instance can continue with its new in-memory token while other instances may not share the same state. The mutex coordinates the current process, not a collection of independently running Cloud Run instances.
View full-size diagramDiagram source
flowchart TD
accTitle: Newsletter preferences are validated before the campaign integration obtains a usable access token and subscribes to the selected topics.
preferences[Language and topic preferences] --> validate[Validate subscription]
validate --> campaign[Campaign integration]
campaign --> expiry[Check token expiry]
expiry -->|Refresh required| provider[OAuth provider]
provider --> memory[Update in-memory token]
memory --> secrets[Attempt secret update]
expiry -->|Token usable| subscribe[Submit selected topics]
memory --> subscribe
subscribe --> result[Report result]
If three topic subscriptions are requested and the second fails, the earlier successful subscription may already exist at the provider. A general error response cannot express the complete outcome. I would introduce an explicit desired subscription set, distinguish provider state from the requested state, and reconcile the difference before retrying. I would also avoid logging raw subscriber information or provider payloads, and review how consent, unsubscribe requests and data retention are handled. The archive contains integrations and interfaces, not proof of a verified consent or privacy compliance program.
The email templates are another small but interesting part of the repository. There are source MJML templates and generated HTML for welcome, course-enrollment and contact-confirmation messages in Arabic and English. Their existence demonstrates that the communication design extended outside the web application. It does not establish that every template was used by a live workflow. I would preserve the template sources as the canonical editable format and make generated output reproducible so that the two languages do not drift apart.
Why the repository contains an email policy service
The smallest Go service in the workspace has a purpose unrelated to displaying educational content. It serves an MTA-STS policy, a mechanism through which a domain can publish expectations for secure inbound mail transport. The service returns a preformatted plain-text policy from the standard well-known path, includes cache-control headers, exposes a health endpoint, and contains a process-local request limiter. The archived default policy is configured in testing mode rather than enforcement mode.
View full-size diagramDiagram source
flowchart TD
accTitle: Mail senders discover a domain's mail transport policy and retrieve it over HTTPS. The archived service publishes the policy in testing mode.
sender[Sending mail system] --> discovery[Domain policy discovery]
discovery --> policy[HTTPS policy endpoint]
policy --> rules[Published TLS and mail-host policy]
rules --> delivery[Mail delivery decision by sender]
The service implementation is only one part of MTA-STS: DNS records, the HTTPS endpoint, its certificate and the behavior of participating mail senders all matter. I cannot establish the historical DNS or transport configuration from source code alone. The testing-mode configuration is also not evidence that the domain was enforcing encrypted mail transport.
Would I keep a dedicated Go deployment for a policy document today? Probably only if its operational requirements justified it. A correctly hosted static text file could satisfy the policy-serving requirement with less infrastructure. The rate limiter's in-memory state is local to each process, and the endpoint is deliberately cacheable. A small service was a useful way to explore the problem, but it is worth asking whether the resulting operational responsibility is proportionate to the work the service actually performs. That question applies to the whole product, not just email.
The operational side: more than pushing a Docker image
The application code represents only part of SiliconCodeCamp. The repository also contains Dockerfiles, Cloud Build definitions, Cloud Deploy configurations, Skaffold profiles, environment configuration and shell scripts for cloud setup and image attestation.
The primary Cloud Build definition defines build and release paths for the learner API and Angular client. It describes these steps for their respective images:
- Build a container identified by the source revision.
- Run an Artifact Registry image vulnerability scan.
- Check the scan result against a configured severity value (
CRITICALin the archived default configuration). - Push the image to Artifact Registry when the preceding steps succeed.
- Resolve the image digest and store it for the following steps.
- Invoke a Binary Authorization attestation script for the image.
- Create a Cloud Deploy release using the digest reference and the relevant Skaffold configuration.
The Cloud Deploy definitions provide a development target and a production target for Cloud Run. There are separate API and client profiles. A dashboard build configuration also exists; I would not claim that every application was released through an identical pipeline simply because they share a repository.
View full-size diagramDiagram source
flowchart TD
accTitle: The configured release sequence builds a revision-tagged image, scans it, applies a severity check, publishes it, resolves its immutable digest, invokes attestation and creates a Cloud Deploy release.
revision[Source revision] --> build[Container build]
build --> scan[Vulnerability scan]
scan --> gate[Evaluate scan result]
gate -->|Rejected| stop[Fail build]
gate -->|Accepted| push[Push to Artifact Registry]
push --> digest[Resolve image digest]
digest --> attestation[Invoke attestation script]
attestation --> release[Cloud Deploy release]
release --> dev[Development target]
dev --> prod[Production target]
Configured pipeline, not a historical deployment record. The actual enforcement of Binary Authorization, IAM permissions and promotion policies would need verification in the cloud environment.
The digest reference is particularly important. A mutable tag is a convenient name, but it does not uniquely establish which image a release is using over time. Passing an image digest to the release process establishes the artifact identity. The scan and attestation should refer to the same image that is ultimately deployed.
That distinction becomes important when a vulnerability is discovered, a deployment fails or a previous release needs to be restored. It is difficult to reason about a rollback if the software identified by a tag has changed since the original release.
There are nevertheless limits to the pipeline visible in the repository. The severity check matches a configured value; it is not evidence of a comprehensive vulnerability policy. A successful scan cannot establish that the application is free from vulnerabilities. An attestation step is useful only if the relevant deployment policy actually verifies it. The configuration does not demonstrate that all these safeguards operated successfully in production.
Today I would express the build and release contract in terms of a few verifiable properties: the artifact is reproducible enough to trace to its source, its dependency and security checks have recorded results, its identity remains stable through promotion, and the previous known-good version is recoverable. I would then choose the minimum infrastructure required to deliver those properties. For an independently maintained product, a shorter reliable release path can be preferable to a sophisticated one with too many separate permissions and services to maintain.
Recreating a release environment
The checked-in release definitions are accompanied by scripts for enabling cloud APIs, preparing Artifact Registry, creating attestors and signing keys, configuring roles, and setting up notification-related Pub/Sub topics. The repository's setup notes also describe manual steps for attaching a source repository to Cloud Build and defining a trigger. There are separate development and production deployment profiles for the main API and client.
The intended artifact flow and the infrastructure prerequisites are related, but they are not the same problem. A build can be fully specified in YAML while still depending on a manually configured identity, a cloud resource that has never been created in the current environment, or a permission that differs between projects. A new contributor can understand the build sequence without being able to reproduce the complete release environment.
View full-size diagramDiagram source
flowchart TD
accTitle: Release configuration depends on environment prerequisites as well as the application source. Both are necessary to create and promote a release.
source[Application source] --> build[Build and verify artifact]
config[Deployment configuration] --> release[Release definition]
build --> release
setup[Cloud resources and identities] --> release
release --> target[Development deployment]
target --> promote[Production promotion]
If I restarted the project, I would first write an environment inventory: which resources are created automatically, which identities own them, which operations require external credentials, and which manual approval steps are intentional. I would run a clean deployment into a disposable environment before claiming reproducibility. I would also separate the configuration needed for a local development session from the permissions required to publish a production release. None of this requires exposing the old private infrastructure identifiers in a public article.
The goal would be to recreate the system from an understood set of prerequisites, rather than a large script that can succeed only when an undocumented cloud account already happens to contain the right resources. That is one of the most practical lessons in looking back at a project that accumulated infrastructure over two years.
Secrets and integrations
The Go initialization code loads integration configuration through Google Secret Manager, including media, payment and email provider configuration. The learner API also contains logic for updating Zoho Campaigns secret versions, retrying operations and cleaning up older versions.
That work reflects a less visible operational reality: access to a third-party system may depend on credentials that change over time. Credential refresh, storage, scope and failure recovery are part of the integration, not just deployment details.
A better design would make ownership of each credential explicit and minimize the applications that can access it. It would avoid logging sensitive values, define a rotation procedure, and make failed refreshes observable. It would also account for service instances that hold configuration in memory while a secret version changes. Having a secret manager is useful infrastructure; it is not by itself proof that every secret is correctly scoped, rotated or absent from the repository.
There is even a small separate MTA-STS service in the archive. It is not directly involved in course delivery, but it illustrates the breadth of operational responsibilities surrounding the product. The repository also includes transactional email and newsletter integrations. These are capabilities around the platform rather than reasons to make the central learning architecture more complicated.
Testing a product that crosses service boundaries
A successful build is a useful starting point, but it does not establish that the business operations described here behave correctly. Looking back at the archive, I do not have a complete historical test report or a verified production trace. I would not use the presence of release configuration as a substitute for that evidence. A retrospective is more useful if it identifies the behavior a future version would have to demonstrate.
I would begin with small tests of domain transformations. Catalog generation needs fixtures representing an ordered course, a missing section, a draft course, lectures with different visibility and resources attached to a lesson. A test should establish which fields are public and which must stay internal. It should also define the intended behavior for an invalid ordering array. A golden JSON fixture would be useful for checking the compatibility of the published catalog when models change. The comparison should emphasize its semantic contract rather than break every time an insignificant serialization detail changes.
Payment tests would need a different set of fixtures. A recorded provider event should be safe to process again. A failed local update should be recoverable. An old event should not overwrite a newer authoritative state just because it arrives later. A course granted by an administrator should not disappear solely because an unrelated order was refunded. I would model those transitions explicitly and test them against a repository abstraction before exercising the real integration. Test fixtures should contain synthetic customer data rather than copied production records.
The media workflow calls for tests of operation boundaries rather than only expected responses. I would simulate a provider creating an asset but the local write failing, a visibility change while processing is incomplete, a timeout after an upload operation has actually succeeded, and an external asset being absent during cleanup. The system needs to tell the difference between an operation that can safely be retried and one whose result must first be reconciled. A small fake provider with controllable failure points would make those situations reproducible without sending large files or creating real provider resources during every test run.
Progress tests would use an independently defined model of a curriculum and a learner's completed lecture identities. Reordering the curriculum should not erase completed identities. Adding a lecture should follow a defined revision policy. A second completion request for the same lecture should not inflate totals. The test cases should cover empty sections, removed lessons and concurrent changes. Once the intended semantics are clear, it becomes easier to compare a Firestore implementation against them rather than accept whatever outcome the current document structure happens to produce.
The Angular applications need tests at the right boundaries as well. A reducer can be tested without a browser. A course navigation model can be tested without creating a real media iframe. A component integration test can verify that the current selection and a delayed response do not produce a mismatched player. An end-to-end test can establish whether an authorized learner can navigate a representative course, open its resources and mark an item complete, and whether an unauthorized learner receives the appropriate experience instead. The administrative application should have separate tests for editing and publication, with representative errors that leave an editor with a clear recovery path.
I would include bilingual fixtures in those tests. A layout that works with a short English heading may behave differently with a long Arabic heading. A test that checks only translated labels does not establish that ordering, direction, punctuation and fallback content are correct. The content model's language variants should be validated independently of the visual layout. Browser checks should examine both directions of the interface, not just whether the page loads.
Finally, release validation should operate on the artifact that will actually be deployed. I would verify its identity, inspect the configuration for the intended environment, run the application with representative credentials or emulated dependencies, and test a rollback procedure using a known-good release. None of this requires a production benchmark or customer dataset. It requires a clear record of which checks have been run, against which artifact, and with what result. These are the tests I would prioritize if I reopened the project, not results I am attributing to the original repository.
Observability and the cost of running the product alone
The architecture distributes responsibility between the learner API, the administration API, Firestore, the identity provider, the payment provider, media hosting, storage, the CDN, email integrations and the release infrastructure. That division saves the application from implementing several specialized systems. It also means an incident can cross boundaries that no single service controls.
For example, a course can be correctly stored in Firestore while the generated public artifact remains stale. A payment can be charged while the local grant has not been applied. A lecture can have a valid metadata record while its video is still unavailable. A successful frontend deployment does not imply that its configured backend is serving the expected API version. Those possibilities follow directly from the separate systems and operations in the code, even though I do not have historical incident data to quantify them.
I would define a small number of operational signals around those user-visible workflows. For publishing, the useful information would include the revision being published, the current public revision, the result of validation and whether the CDN update completed. For payments, I would want the number and age of pending transitions, reconciliation results and evidence of duplicate events being handled safely. For media, I would want to know which operation is pending, which provider representation is ready and whether the stored lecture policy agrees with the published metadata. These are domain observations rather than arbitrary server metrics.
The first implementation would not need a full observability platform. Structured logs and durable operation records could provide a practical beginning. An operator should be able to investigate a single transaction or publication without searching thousands of unrelated messages or recording secret values in a log. A small status view built from those records might be more useful than a generic dashboard full of graphs that cannot answer whether a learner received access.
There is a similar question about operating costs. The source establishes the presence of various cloud and provider integrations, but it does not contain reliable historical invoices, sustained traffic measurements or a verified monthly cost breakdown. I would not assign dollar figures to the old project from its configuration. What I can identify are the cost dimensions a future implementation would need to evaluate: Firestore reads and writes, public catalog generation, CDN delivery, media storage and processing, API execution, build and scan workloads, and external service plans.
Some of those costs are related to requests, others to stored data or operational frequency. Publishing the entire catalog on every small content correction can become unnecessary work as a catalog grows. A full user-list download can become expensive or slow independently of the cost of browsing courses. Repeated container builds and vulnerability scans consume resources even when there is no learner activity. Measuring those paths separately would tell me more than calling the entire architecture cheap or expensive.
Operational simplicity is particularly important for a product maintained by one person. Every provider integration has a credential, configuration, dependency contract, possible quota, support process and failure mode. Every independently deployed service adds a release and rollback path. I would keep external services where they remove substantial specialized work, particularly media processing and delivery. I would be more demanding about infrastructure added solely for a degree of separation that the product has not yet needed. The appropriate degree of sophistication is the one I can reliably operate, verify and change.
What the architecture was good at, and where it cost me complexity
Looking at the project now, I would separate the decisions that expressed a real product requirement from the decisions that multiplied implementation effort.
The catalog projection is one of the decisions I would keep. It establishes a meaningful boundary between a mutable editing model and a public read model. I would improve its consistency guarantees and versioning rather than replace it with an API simply because the source database is already available.
I would also keep payment state separate from access decisions. The distinction is useful even if the backend is reorganized entirely. I would change the storage model and processing guarantees so a course grant has traceable provenance and payment events have explicit idempotency and reconciliation semantics.
The division between educational records and external media assets is equally useful. The application owns the curriculum; a provider owns encoding and serving the files. I would avoid assuming that the provider and application always change state together, and make media operations explicit jobs with recoverable outcomes.
Other choices deserve more skepticism. The application-specific NgRx patterns are powerful, but not every local state transition needs the full pattern. Separate Go services give the learner and administration paths distinct deployment boundaries, but they also duplicate models and share persistence assumptions. Depending on the operational requirements, a modular Go application with carefully separated administrative and learner interfaces could retain most of the useful boundaries with fewer separately deployed units.
These choices are not binary. There is no requirement to abandon the monorepo, Firestore, Go or Angular to make the system easier to maintain. I would evaluate the boundaries according to the kinds of changes that actually happen together, rather than treat the number of technologies or services as evidence of sophistication.
- Course content: Decision I would retain — Separate editable and public representations; Change I would prioritize — Validate and version publications; retain rollback artifacts.
- Payments: Decision I would retain — Separate transaction and access concepts; Change I would prioritize — Idempotent processing, explicit entitlement provenance and reconciliation.
- Video: Decision I would retain — External media delivery with application-level policy; Change I would prioritize — Durable media operations and readiness-aware publication.
- Progress: Decision I would retain — Stable lecture identifiers and derived summaries; Change I would prioritize — Define curriculum revision semantics and bound progress record size.
- Frontend: Decision I would retain — Shared types, data contracts and important domain state; Change I would prioritize — Reduce duplicated state and unnecessary indirection.
- Identity: Decision I would retain — Explicit trust boundaries and separate administrative concerns; Change I would prioritize — Test authorization policies, provisioning retries and credential scope.
- Deployment: Decision I would retain — Immutable artifacts, security checks and controlled promotion; Change I would prioritize — Simplify the delivery path while verifying enforcement.
I would begin with invariants and failure-mode tests before changing frameworks or reorganizing infrastructure. A few well-chosen tests could establish whether a new version is actually an improvement:
- A failed catalog generation must leave the previous complete publication available.
- Reprocessing the same payment event must not create a duplicate entitlement.
- Revoking one purchase must not revoke a separate valid entitlement.
- A lecture must not switch to an unavailable media representation after a failed provider operation.
- Marking the same lecture complete repeatedly must produce the same progress state.
- A curriculum change must have a defined effect on existing learners' completion history.
- A retried onboarding event must preserve existing progress and access records.
- A release must identify the same immutable artifact that passed its required checks.
These are proposed acceptance properties, not tests I am claiming were already present or passed in the archived implementation. They would give a new version a concrete standard against which to assess architectural changes.
If I reopened the repository tomorrow
I would not begin by replacing the frameworks. My first task would be establishing a reproducible working baseline from the archived source. It would involve reconstructing the build environment with the versions the repository actually uses, identifying required external configuration, setting up non-production dependencies or emulators, and establishing which workflows can be exercised without contacting the original live services. An old source snapshot is valuable even when its infrastructure is no longer running, but I would not assume that a previously configured deployment still works with contemporary provider defaults.
The next step would be a domain inventory, not a dependency inventory. I would write down what a course, section, lecture, media asset, publication, transaction, grant and progress record mean. I would identify which operations can change each of them, which identities must remain stable, and which representations are derived. For example, a provider video GUID identifies a representation of a recording, not the educational lecture itself. A transaction is evidence of a purchase workflow, not the complete access policy. A public JSON catalog represents a published view, not the mutable administration database.
Those definitions would lead directly to tests. I would start with the publication and access invariants because errors there cross several parts of the product. I would build fixtures from synthetic data and establish the expected behavior when records are incomplete, external calls fail or operations are repeated. Only then would I replace pieces of the implementation. That order matters: changing a state library, datastore or service boundary before defining the expected behavior would make it difficult to know whether the replacement preserved what the existing system was intended to do.
For the backend, I would investigate bringing some of the overlapping domain code into a shared Go module. A shared definition need not mean that every service exposes the same API or accepts the same permissions. It would give the learner and administrative paths a common vocabulary for interpreting persisted data. Public and administrative response models could remain different projections. If the deployment boundaries remained useful, the services could continue to build independently. If a simpler operational model was adequate, that shared domain code would also make consolidation less disruptive.
I would approach the frontend similarly. I would keep domain-specific shared libraries where they genuinely reduce duplication, and examine how much global state the learner and dashboard applications actually need. A store can be an excellent place for cross-route catalog and account state. It is less valuable for a flag that describes a local dialog or transient interaction. A smaller set of strongly owned state domains would help me understand which updates should invalidate a cached result and which changes should remain purely local.
The public catalog would be one of my first architectural experiments. The goal would be to publish an immutable, validated artifact and retain a known-good prior version. Instead of treating successful upload and cache purge as one implicit outcome, I would define an observable publication lifecycle. A reader would continue to see a complete previous catalog until the next complete one was ready. I would explicitly test the client with an older catalog while the service had newer access or media state. That is the environment in which the distinction between stable identifiers and mutable metadata becomes most valuable.
I would then revisit the payment and entitlement boundaries. The ideal result would allow an operator to answer why a specific learner can access a specific course, including the source of each active grant. Processing the same provider notification twice would have the same effective outcome. A refund and an administrative grant could coexist without one accidentally overwriting the other. That work does not require a fashionable architecture. It requires precise transition rules, an appropriate persistence mechanism and a reconciliation process that can explain its own decisions.
Only after that foundation would I reconsider deployment complexity. I would preserve the idea of promoting an identified artifact through validation and deployment, but choose the fewest services necessary to do so reliably. I would keep the infrastructure configuration versioned and the release procedure reproducible. I would also document which external setup is intentionally not contained in the repository, so that recreating the environment does not depend on remembering a series of manual console changes. This would make the project easier for me to revisit and easier for another engineer to understand.
That would be a reasonable way to make the old system better without losing its useful ideas. It is a plan for a hypothetical new iteration, not an announcement that I am restarting SiliconCodeCamp. I have no plans to announce a relaunch here.
Two years of development, viewed from the present
One thing I appreciate about having kept the source is that I can revisit the actual decisions rather than reconstruct an idealized version of the project from memory. I can see the state abstractions, the duplicated types, the migration utilities, the publishing paths, the external integrations and the release configuration. I can also see where a happy-path implementation needed a more deliberate failure model.
There is something useful in that distinction. A system can be technically substantial without every part of it being well designed. I would not make a modern implementation more impressive by adding more technologies to the stack. I would make the domain contracts clearer, choose fewer abstractions where they do not help, and spend more of the engineering effort on making the important workflows reliable under failure.
SiliconCodeCamp is no longer maintained, and I do not have verified production traffic, commercial results or performance measurements to publish. The value of this retrospective is different: it documents a complete product development effort, including the parts of engineering that are usually absent from a demonstration of the interface.
The next time I work on a product, I can draw on this code as something concrete. I can compare a new content model with an old one, evaluate a simpler release process against the previous configuration, and ask whether a new architecture really handles consistency and change more effectively. I do not need to recreate SiliconCodeCamp to benefit from the work that went into it.
For me, that makes these two years worth documenting.