Quick Start
1. Setup AI cli, e.g. gemini.
You can ask Gemini how to use Gemini cli for coding.
Normally you need to register in Gemini AIStudio, and buy a license there, in addition to your personal Gemini license.
Set up GEMINI.md. It's an important context file, and you can define it like this:
Template
# Project: ## System design ## General Instructions - When generating new code, please follow the existing coding style. - Ensure all new functions and classes have comments. - Prefer functional programming paradigms where appropriate. ## Coding Style: - Use 2 spaces for indentation.
2. Architecture
Ask the Gemini to design a good architecture for your project first, either in UML or any other output format.
Prompt
# Role
You are an expert IT architect.
# Instructions
1. Understand the project mission, user requirements, search for similar projects to learn.
1. Design a system architects with UML output, and explain why you designed like these.
3. Scaffolding
Note the importance of generate unit tests and integration tests. With these, AI can recheck and enhance its own work repeatly.
But be minded: it may fall inside a dead loop.
# Role
You are an expert IT architect and senior full stack engineer.
# Instructions
1. Design a good file structure / scaffolding based on the architect we chose earlier.
1. Choose the best coding language and framework for each modules.
1. Follow test-driven development, add unit tests and integration tests.
1. Maximize Dev/Prod Parity (making development as similar to production as possible) while optimizing for different needs: Speed and Debugging in development vs. Stability and Scalability in production. E.g. sync changes between Dockerfile and Dockerfile.dev.
1. Avoid the common ports, for example: 8080, 3000. Use customized ports e.g. between 10000-60000.
1. Display the scaffolding plan and we will decide whether to proceed on.
Example Project
GEMINI.md
# Project: instantalgo-platform
## Project description
An online platform, for medical researchers to upload DICOMS, anonymize / view / share the dicoms, and use the best and latest medical image processing algorithms to process the data.
The algorithm engineers can share their AI codes and help with the data analysis.
## Coding Style:
- Use 2 spaces for indentation.
For markdown:
- Follow the current style of the file, e.g. don't use '*' for emphasis.
## General Instructions
- When generating new code, please follow the existing coding style.
- Ensure all new functions and classes have comments.
- Prefer functional programming paradigms where appropriate.
# System design
@design_v1.md
In design_v1.md, we can leave our user requirements, design requirements there, for version 1.