are normally divided right into a separate frontend and backend. The frontend handles what the consumer sees, whereas the backend handles all the logic and processing. This can be a pure separation of issues that the majority platforms merely use as a result of it really works properly.
Nonetheless, while you make modifications to your software, you usually have to make modifications to each the frontend and the backend. That is the place full-stack engineers are available in: engineers who work with each the frontend and backend.
Working with each frontend and backend will be difficult, nonetheless, resulting from a number of causes:
- They’re usually written in numerous languages: frontend with TypeScript and the backend with Python
- It’s important to take care of permissions and auth, and take care of challenges like CORS errors
- They’re in numerous repositories and are deployed individually.
With the discharge of coding brokers, working with each frontend and backend code on the similar time has turn out to be easier. On this article, I’ll provide you with a high-level overview of how I work every day with each frontend and backend code, and ensure the 2 programs combine seamlessly.
Why work with each frontend and backend
The rationale you’re employed with each frontend and backend code on the similar time is just due to necessity. Let’s say you wish to add a brand new characteristic in your software, the place a consumer can retailer their AI chatbot conversations and entry them later.
This characteristic merely requires modifications in each the frontend and the backend. It’s essential to replace the frontend to show the earlier conversations, and also you want the backend to deal with the storage and retrieval of conversations. Thus, you don’t have an choice to work with each the frontend and backend code.
Moreover, as an engineer, it’s normally simpler to work with each frontend and backend. Think about when you needed to implement the AI chatbot conversations characteristic, and also you have been solely engaged on the frontend. You’ll then must implement the frontend a part of the course, after which coordinate with one other backend engineer on easy methods to retailer the conversations. You’d must spend time discussing:
- The schema for storing conversations
- Which knowledge must be included?
- What ought to the endpoint be referred to as
That is tremendous time-consuming. Should you’ve ever labored in a processional software program engineering setting, you know the way a lot time it takes.
As an alternative, when you do the work solo, you don’t must do any coordination and might transfer at a a lot larger velocity.
Methods to work successfully with frontend and backend code
On this part, I’ll cowl some methods I exploit to work successfully with each frontend and backend code. With the discharge of a super-effective coding agent, this has turn out to be a lot easier, and also you don’t have to have in depth expertise in each frontend and backend code to be efficient.
Use Workspaces
Workspaces are an extremely highly effective characteristic when working in a number of repositories. You are able to do this with Cursor utilizing “Add workspace”, or with any CLI software by merely pointing the agent to the repositories you wish to work with. Now the mannequin can have the context of each related repositories and thus be capable of implement a full-stack resolution in a single go.
Workspaces are unimaginable. Earlier than I found it, I used to work with two separate Cursor tabs, one with the frontend code and one with the backend code. I’d then make one change within the frontend, and manually replace the backend to just accept this new change.
No marvel it took ages for me to place out options. Now, I merely immediate my agent to replace the frontend in line with some directions, and it mechanically updates the backend with the corresponding code to just accept the frontend modifications. In fact, this works the opposite approach as properly.
Monorepos
Monorepos are additionally tremendous highly effective. The other of a monorepo is to have all your code unfold into totally different repositories (normally known as microservices). In my expertise, this doesn’t work very properly, because it merely makes it tougher for you and your coding brokers to maintain observe of the place all the pieces is.
As an alternative, I extremely suggest transferring all the pieces to a monorepo, the place you may have all of your code in a single codebase. Now you may simply create guidelines, akin to pre-commit hooks, that apply to all your code and do not need to duplicate them throughout a number of repositories. Moreover, you may simply have AGENTS.md recordsdata protecting and explaining the entire repository, so brokers simply maintain observe of the place all the pieces is.
If all of your code is in a monorepo, you’d additionally not want workspaces, as I described within the final part. Nonetheless, it’s fairly widespread to have a monorepo for the frontend/API code, after which a separate repository dealing with extra complicated processing, akin to operating brokers or doing doc processing. Thus, you’ll usually have to make use of workspaces anyway.
AGENTS.md as context
One other essential tip is to actively use and replace AGENTS.md. There are a lot of options to AGENTS.MD, akin to CLAUDE.md, WARP.md, or .cursorrules. In my expertise, nonetheless, AGENTS.MD is learn by all coding brokers, irrespective of which one you employ.
Thus I like to recommend utilizing AGENTS.md as a result of when you ever change an agent sooner or later, or your coworkers are utilizing totally different brokers, you may all profit equally.
You possibly can have an AGENTS.md file within the root of your repository that gives a high-level overview of the repository, sort of like a README. This will clarify to the agent which folders include which logic, making it simpler for the agent to navigate the code.
Moreover, you may have AGENT.md in all subfolders as properly. For instance, you probably have a service in a single folder, you possibly can have an AGENTS.md file there explaining how the service works, or any quirks to concentrate on.
I additionally wish to add that everytime you make modifications to your code, remember to replace AGENTS.md. You possibly can, for instance, immediate your coding agent to replace the related AGENTS.md recordsdata for you, given what it discovered in its final session, and it’ll mechanically add essential notes. Remember to push these modifications to GitHub as properly, after all, so your colleagues can profit from the information you’ve gained.
Conclusion
On this article, I’ve mentioned easy methods to successfully work with each frontend and backend code. I began off by explaining why it’s essential to know easy methods to work with each frontend and backend, highlighting that it’s normally a simpler approach of getting stuff carried out. Moreover, I elaborated on some methods I exploit to work successfully with frontend and backend, protecting using Workspaces, monorepos, and AGENTS.md. I imagine that sooner or later, we’ll all be full-stack engineers, contemplating how efficient coding brokers are. The work of a human engineer will merely be to coordinate all of your brokers in the simplest approach potential, to be able to clear up crucial issues, in the perfect and best method.
👉 My free eBook and Webinar:
🚀 10x Your Engineering with LLMs (Free 3-Day E mail Course)
📚 Get my free Imaginative and prescient Language Fashions e-book
💻 My webinar on Imaginative and prescient Language Fashions
👉 Discover me on socials:
💌 Substack
