SShortSingh.
Back to feed

Planning the Go Backend for a Pantry Tracker: Structure and API Design

0
·5 views

The author has finished designing the database and now plans the Go backend before writing any code. They note they know some Go but have never built a project following idiomatic Go conventions. Go has no official project layout, so the author adopts two common conventions: a cmd/ folder for runnable programs and an internal/ folder for the rest of the code. They prefer organising internal code by feature rather than by layer, which keeps related logic in one place and reads well with Go's package naming. The resulting structure separates product, pantry, and category features alongside shared folders such as auth, database, config, and httpjson. They also explain that shared code goes in its own small folder to avoid Go's import cycles.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer builds random video chat with WebRTC, Socket.IO and Redis, and shares production bugs

A developer describes building Chaface, a free 18+ random video chat service that runs in browsers and on Android. The architecture uses React and TypeScript on the frontend, Node.js with Socket.IO for signaling, Redis for matching queues, and PostgreSQL for storage. Video and audio flow directly between users when possible, with a self-hosted TURN server relaying media only when needed. The author explains that matching works through Redis lists, and that country filters could leave small user bases in empty queues, which was fixed with a priority cascade. The post focuses on real-world lessons such as avoiding fallback logic that skips people who are waiting.

0
ProgrammingDEV Community ·

Diagnosing Corrupted Marketplace Archive Downloads Caused by Multipart Upload Gaps

A corrupted ZIP download can be traced back through the upload manifest to determine whether the stored object is complete. The recommended approach is to compare the file's length against the source export, then check the download response, the published object, the completion record, and the numbered parts in turn. Upload sessions and catalog records should stay separate, with download links issued only after completion and verification succeed. Parallel uploads require completion to sort parts by their assigned numbers, and retries should reuse part numbers and consult persisted manifests to avoid ambiguous objects. Download responses also need an intentional cache policy suited to private content.

0
ProgrammingDEV Community ·

VibeTrack: local task board where Claude Code agents work and humans review diffs

VibeTrack is a task board that coordinates Claude Code agents on routine development jobs such as bug fixes, page updates, and release notes. Each task runs in its own git worktree, and finished work waits in a Review column where the user inspects the diff before accepting it. Nothing merges into the main branch until the user approves, and accepted work goes through a merge queue using no-ff merges to preserve history. The tool runs locally on a Mac with no cloud service or account required. Agents are configured as named presets with roles, models, access modes, and working rules, and the Home screen summarizes pending reviews, active runs, and upcoming work.

0
ProgrammingDEV Community ·

Filter Excel PivotTable Totals Quickly with a Slicer

When filtering Excel PivotTable totals by branch, the usual method requires opening the top filter list, adjusting checkboxes, and clicking Apply. A slicer added from the PivotTable tab provides branch buttons, so one click shows a single branch's total, such as Seoul. To view several branches at once, the author enables the multi-select button at the top of the slicer and clicks additional branches. In a test of a 12-row table in Excel for the web with a Korean interface, the total dropped from 7,680 to 3,050 after selecting Seoul, and rose to 5,315 when Busan was also selected. The desktop version was not tested.