A location-aware historical context application that brings history to life through AI-powered narratives. Users can explore the historical significance of any location by simply providing coordinates and a radius, then engage in an interactive conversation to learn more about the area's past.
One Click History is a full-stack application built using concept-oriented design principles. The backend exposes location-based historical context generation through a REST API, while the frontend (in a separate repository) provides an intuitive interface for users to explore history through their device's GPS.
- Location-Based Historical Narratives: Generate rich, contextual historical information for any geographic location
- Interactive Q&A: Ask follow-up questions grounded in the location's historical context
- Session Management: Save and resume conversations about specific locations
- User Authentication: Secure user accounts with unique profiles
- Chat History: Browse previous explorations without loading full conversation data
Built using concept-oriented design, the application is structured around three core concepts:
- UserAuthentication: Manages user registration, login, and profile identification
- AIHistoricalContextAgent: Generates location-aware historical narratives with built-in validation to prevent hallucinations
- LocationChatLedger: Stores chat metadata as a reference system for browsing past conversations
- Backend: TypeScript with Deno runtime
- Database: MongoDB Atlas
- LLM: Google Gemini 2.5 Flash
- Framework: Custom concept engine with synchronizations
- Design Tool: Context (markdown-based LLM collaboration)
- Design Changes: Evolution of the concept architecture from Assignment 2 through Assignment 4b
- Reflection: Personal reflections on the development process, challenges, and insights about LLM-assisted software development
- Trace Log: Example server execution trace showing the system in action
- Final Video: Demonstration of the complete application (link to be added)
- Deno installed
- MongoDB Atlas account (free tier)
- Google Gemini API key
- Clone the repository
git clone <repository-url>
cd one_click_history- Configure environment variables in
.env:
GEMINI_API_KEY=your_key_here
GEMINI_MODEL=gemini-2.5-flash
MONGODB_URL=your_mongodb_connection_string
DB_NAME=your_database_name- Compile Context tool (optional):
deno compile -A --output ctx .ctx/context.ts- Run the server:
deno task conceptsThe API server will start on http://localhost:8000
Complete API documentation is available in design/API-DOCUMENTATION.md, including:
- Endpoint specifications for each concept
- Request/response formats
- Example workflows with curl commands
- Error handling details
Individual concept specifications:
Run all tests:
deno test -AThis project was developed using the Context tool, a markdown-based framework for design-driven development with LLM collaboration. All design decisions, iterations, and LLM interactions are preserved in the context/ directory.
Key design artifacts:
design/background/: Concept design principles and implementation guidesdesign/concepts/: Individual concept specifications and implementation notescontext/: Complete version history of all design documents
src/
├── concepts/ # Core concept implementations
│ ├── UserAuthentication/
│ ├── AIHistoricalContextAgent/
│ └── LocationChatLedger/
├── syncs/ # Synchronization rules between concepts
├── engine/ # Concept engine framework
└── main.ts # Application entry point
design/
├── concepts/ # Concept specifications
├── background/ # Design principles and guides
└── API-DOCUMENTATION.md
context/ # Complete design history (preserved)
The AIHistoricalContextAgent implements a sophisticated validation system:
- Secondary checker agent validates location claims before accepting responses
- Hemisphere verification prevents geographic mismatches
- Retry mechanism with feedback allows the LLM to correct mistakes
- Up to 3 attempts with cumulative validation feedback
- LocationChatLedger stores only metadata (location, timestamp, main location name)
- AIHistoricalContextAgent manages full conversation history and state
- This separation enables efficient chat browsing without loading entire conversation histories
Developed for MIT 6.104: Software Studio (Fall 2025)
Assignment series exploring concept-oriented design, LLM-assisted development, and full-stack application architecture.
Davis Lee