add-api-endpoint
Skill44 starsChanged 5 months agoApache-2.0View on GitHub
Step-by-step workflow for adding a new REST API endpoint to pulse-server. Use when creating a new backend endpoint, route, resource, or API in backend/server/.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- willdady/platypustheir own version, first seen Nov 8, 2026
- dipu-bd/lightnovel-crawlertheir own version, first seen Oct 8, 2026
- lncrawl/lightnovel-crawlertheir own version, first seen Oct 8, 2026
- Sandhyaa-a/Kaggle_main_Projecttheir own version, first seen Jul 6, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- dipu-bd/lightnovel-crawler★ 2.6ksame name
- lncrawl/lightnovel-crawler★ 2.6ksame name
- willdady/platypus★ 130same name
- Sandhyaa-a/Kaggle_main_Project★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- product/CLAUDE.mdCLAUDE.md
- pulse-web-otel/CLAUDE.mdCLAUDE.md
- add-ai-sub-agentSkill
- add-alert-metricSkill
- add-ui-componentSkill
- add-ui-screenSkill
- clickhouse-migrationSkill
- deploy-serviceSkill
- fatal-fiveSkill
- integrate-pulse-web-sdkSkill
- pr-reviewSkill
- pulse-prd-authorSkill
- pulse-prd-reviewSkill
- web-otel-spec-audit-orchestratorSkill
- web-otel-spec-implementation-auditSkill
- web-sdk-e2e-matrixSkill
- web-sdk-instrumentSkill
- web-sdk-shipSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 104
Add to ServiceError.java enum if new failure cases exist.
- Very specific: line 108
Add bind(MyService.class).to(MyServiceImpl.class) in the appropriate module.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add API Endpoint
Workflow
Copy this checklist and track progress:
- [ ] Step 1: Create/update DTO
- [ ] Step 2: Create/update Service interface
- [ ] Step 3: Create/update Service implementation
- [ ] Step 4: Create/update DAO + Queries
- [ ] Step 5: Create MapStruct mapper
- [ ] Step 6: Create REST resource (controller)
- [ ] Step 7: Add ServiceError codes
- [ ] Step 8: Register in Guice module
- [ ] Step 9: Write unit tests
- [ ] Step 10: Verify buildStep 1: Create/Update DTO
Location: backend/server/src/main/java/org/dreamhorizon/pulseserver/dto/
@Data
public class MyRequest {
private String name;
private String description;
}
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class MyResponse {
private String id;
private String name;
}Step 2: Service Interface
Location: backend/server/src/main/java/org/dreamhorizon/pulseserver/service/<domain>/
public interface MyService {
Single<MyResponse> create(MyRequest request);
Single<List<MyResponse>> list();
}Step 3: Service Implementation
Location: service/<domain>/impl/
@RequiredArgsConstructor(onConstructor = @__({@Inject}))
public class MyServiceImpl implements MyService {
private final MyDao myDao;
// Implementation using RxJava
}Step 4: DAO + Queries
public class MyQueries {
public static final String INSERT = "INSERT INTO ...";
public static final String SELECT_ALL = "SELECT ...";
}Step 5: MapStruct Mapper
@Mapper
public interface MyMapper {
MyMapper INSTANCE = Mappers.getMapper(MyMapper.class);
MyResponse toResponse(MyModel model);
}Step 6: REST Resource
Location: resources/
@Path("/v1/my-resource")
public class MyResource {
@Inject private MyService service;
@GET
public void list(RoutingContext ctx) {
RestResponse.jaxrsRestHandler(ctx, service.list());
}
}Step 7: ServiceError Codes
Add to ServiceError.java enum if new failure cases exist.
Step 8: Guice Binding
Add bind(MyService.class).to(MyServiceImpl.class) in the appropriate module.
Step 9: Tests
JUnit 5 + Mockito + AssertJ, @Nested grouping, should* naming.
Step 10: Verify
cd backend/server && mvn clean installDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

