From ebc5b5c75758a32bcb2f8ecefae0e4bf3aafc0c4 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Thu, 24 Jul 2025 10:54:58 +0300 Subject: [PATCH] fix: update PRD save location to /docs and enhance tech stack details --- docs/create-prd.md | 4 ++-- docs/tech-stack.md | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/create-prd.md b/docs/create-prd.md index 25c7be3..96a0a6c 100644 --- a/docs/create-prd.md +++ b/docs/create-prd.md @@ -9,7 +9,7 @@ To guide an AI assistant in creating a detailed Product Requirements Document (P 1. **Receive Initial Prompt:** The user provides a brief description or request for a new feature or functionality. 2. **Ask Clarifying Questions:** Before writing the PRD, the AI _must_ ask clarifying questions to gather sufficient detail. The goal is to understand the "what" and "why" of the feature, not necessarily the "how" (which the developer will figure out). Make sure to provide options in letter/number lists so I can respond easily with my selections. 3. **Generate PRD:** Based on the initial prompt and the user's answers to the clarifying questions, generate a PRD using the structure outlined below. -4. **Save PRD:** Save the generated document as `prd-[feature-name].md` inside the `/tasks` directory. +4. **Save PRD:** Save the generated document as `prd-[feature-name].md` inside the `/docs` directory. ## Clarifying Questions (Examples) @@ -46,7 +46,7 @@ Assume the primary reader of the PRD is a **junior developer**. Therefore, requi ## Output - **Format:** Markdown (`.md`) -- **Location:** `/tasks/` +- **Location:** `/docs/` - **Filename:** `prd-[feature-name].md` ## Final instructions diff --git a/docs/tech-stack.md b/docs/tech-stack.md index 0047fc0..289554a 100644 --- a/docs/tech-stack.md +++ b/docs/tech-stack.md @@ -1,8 +1,12 @@ +## Tech stack + ### Source code: - backend: - Express + TypeScript + - Node.js + - npm - REST API - GeoIp client library @maxmind/geoip2-node in reader mode. The databases are downloaded by geoipupdate service - https://maxmind.github.io/GeoIP2-node/ @@ -30,3 +34,20 @@ - Seq logging - Seq url and secrets also in config + +--- + +## Service description + +- Simple REST API built with Express + TypeScript in Node.js to serve in the network the geoip date based on the IP received in the input. Also, the API should have different methods for a single IP or for a list of IPs. The API structure can be inspired from the api in @maxmind/geoip2-node npm package. +- To read the data from the GeoIp databases, the library @maxmind/geoip2-node will be used. To access the databases, there will be used a configurable directory path because the databases are downloaded and maintained by the geoipupdate official service. + +- This service will have a simple UI. A single page I think is enough. The page design can be inspired from the other GeoIp services online and will contain a textfield there at the first start will auto detect and write the client IP. This field will be editable and the user will have the possibility to write any other IP in it. With a debounce, the written IP will be queried via the API methods and the received data will be displayed in a professional way. + +- The location will be displayed on a simple and free map based on the API data. + +- For the infrastructure part, the application will share the same repository for both backend and frontend. Also, add for it a dockerfile that will build both frontend and backend in the same image. I want the application to be a single program accessible on a single port. + +- For the development environment, add packages that will help the developer to write the code as linters or prettier, put keep the structure simple because this service wil remain very lite. + +- In the end, this service will be built as a docker image and started in the same docker-compose with geoipupdate service and they will share the same docker volume for the databases.