- Hero section with prominent pricing and quick registration link
- Interactive line chart with 1M/3M/1Y/ALL time period selection
- Integrated domain search directly on TLD page
- Smart registrar comparison table with external links
- Savings calculator showing cost savings vs most expensive registrar
- Renewal price warning indicator (⚠️) for high renewal fees
- Related TLDs section with smart suggestions
- Price alert modal for email notifications
- Responsive design for all screen sizes
- Loading skeletons and error states
2.4 KiB
2.4 KiB
DomainWatch - Technical Context
Tech Stack
Backend
- Framework: FastAPI (Python 3.11+)
- Database: SQLite (development) / PostgreSQL (production)
- ORM: SQLAlchemy 2.0 with async support
- Authentication: JWT with python-jose, bcrypt for password hashing
- Scheduling: APScheduler for background jobs
Frontend
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS
- State Management: Zustand
- Icons: Lucide React (outlined icons)
Domain Checking
- WHOIS: python-whois library
- DNS: dnspython library
- No external APIs required
Project Structure
hushen_test/
├── backend/
│ ├── app/
│ │ ├── api/ # API endpoints
│ │ ├── models/ # Database models
│ │ ├── schemas/ # Pydantic schemas
│ │ ├── services/ # Business logic
│ │ ├── config.py # Settings
│ │ ├── database.py # DB configuration
│ │ ├── main.py # FastAPI app
│ │ └── scheduler.py # Background jobs
│ ├── requirements.txt
│ └── run.py
├── frontend/
│ ├── src/
│ │ ├── app/ # Next.js pages
│ │ ├── components/ # React components
│ │ └── lib/ # Utilities
│ └── package.json
└── memory-bank/ # Project documentation
API Endpoints
Public
POST /api/v1/check/- Check domain availabilityGET /api/v1/check/{domain}- Quick domain check
Authenticated
POST /api/v1/auth/register- Register userPOST /api/v1/auth/login- Get JWT tokenGET /api/v1/auth/me- Current user infoGET /api/v1/domains/- List monitored domainsPOST /api/v1/domains/- Add domain to watchlistDELETE /api/v1/domains/{id}- Remove domainPOST /api/v1/domains/{id}/refresh- Manual refreshGET /api/v1/subscription/- User subscription infoGET /api/v1/subscription/tiers- Available plans
Development
Backend
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python run.py
Frontend
cd frontend
npm install
npm run dev
Production Deployment
- Backend: uvicorn with gunicorn
- Frontend: next build && next start
- Database: PostgreSQL recommended
- Reverse proxy: nginx recommended