This document outlines the changes made during the repository refactoring from TypeScript/Node.js to Python/Streamlit/PostgreSQL.
The following TypeScript/Node.js files are no longer needed and can be safely removed:
package.json- Node.js dependency management (replaced byrequirements.txtandpyproject.toml)package-lock.json- Lock file (if present)node_modules/- Node.js dependencies directory
tsconfig.json- TypeScript compiler configurationbanking/banking.ts- TypeScript implementation (replaced bybanking/banking.py)banking/types.ts- TypeScript types (replaced bybanking/types.py)banking/banking.test.ts- Vitest tests (replaced bybanking/test_banking.py)
agent-sandbox/- TypeScript examples (can be removed or kept for reference)Dashboard.tsxexample.jspackage.legacy.json
app.py- Main Streamlit application.python-version- Python version specificationrequirements.txt- Python dependenciespyproject.toml- Modern Python project configuration
db/- Database package__init__.py- Package initializationconnection.py- PostgreSQL connection managementmodels.py- Database data modelscrud.py- CRUD operations
migrations/- Yoyo migration scripts0001_initial_schema.py- Initial database schema0002_sample_data.py- Sample data for testingREADME.md- Migration documentation
yoyo.ini- Yoyo migration configuration
banking/banking.py- Business logic (from TypeScript)banking/types.py- Type definitions (from TypeScript)banking/test_banking.py- Pytest tests (from Vitest)banking/__init__.py- Package initialization
.env.example- Environment variable template.streamlit/config.toml- Streamlit configuration.gitignore- Updated for Python
README.md- Updated with Python/Streamlit instructionsAGENTS.md- Updated with Python guidelinesCONVENTIONS.md- Updated with Python conventions
To complete the migration:
-
Remove TypeScript files:
rm package.json tsconfig.json rm banking/banking.ts banking/types.ts banking/banking.test.ts rm -rf node_modules/
-
Install Python dependencies:
pip install -r requirements.txt
-
Set up database:
cp .env.example .env # Edit .env with your PostgreSQL credentials createdb banking_app yoyo apply --config yoyo.ini -
Run tests:
pytest
-
Start application:
streamlit run app.py
- Before: TypeScript + Node.js + Vitest
- After: Python 3.11+ + Streamlit + Pytest
- Before: No database (in-memory only)
- After: PostgreSQL with Yoyo migrations
- Before: No UI (business logic only)
- After: Streamlit interactive web application
- Before: TypeScript interfaces and types
- After: Python dataclasses with type hints
- Before: Vitest with describe/it
- After: Pytest with class-based organization
- Before: npm/package.json
- After: pip/requirements.txt + pyproject.toml
The following were preserved and adapted:
banking-spec.md- Functional requirements (language-agnostic)prompts/- Prompt experiments (unchanged)charts/- Mermaid diagrams (unchanged)docs/- Static assets (unchanged)
- Database Persistence - PostgreSQL provides real data storage
- Interactive UI - Streamlit offers immediate visual feedback
- Better Typing - Python 3.11+ type hints + mypy validation
- Simpler Deployment - Single
streamlit runcommand - Data Science Ready - Python ecosystem for analytics
- Professional Tooling - Black, Flake8, MyPy, Pytest