To get the most out of AI it makes sense to architect your frontend in a well-known and predictable way. I’ve been thinking about what an AI-ready frontend architecture might look like but have yet to test and recommend a specific solution. However, Nelson Michael has an interesting take on the problem in the article A Developer’s Guide to Designing AI-Ready Frontend Architecture.
Here are some key points:
- AI amplifies weak architecture
- Teach AI your architecture explicitly file
- Directory conventions matter more than ever
- Use design systems as constraints
- The use-case pattern is the backbone
- Use middleware for cross-cutting concerns
- Pay special attention to auth, testing, and observability