How daisukebtw/ipty works
IPTY is a small public-IP lookup service: a visitor opens the web page, which requests the visitor’s IP from the API and displays it, with copy actions for the IP and a curl command. The API derives the address from forwarding headers or the request connection. Source excerpts show the frontend routing, request, and API logic; the README provides no additional feature detail.
Main entry points: IPDisplay.tsx IP display · App.tsx App shell · Index.tsx Home page · api.py IP endpoint
Components 11
Web experience
- App entry
app/src/main.tsx - App shell
app/src/App.tsx - Home page
app/src/pages/Index.tsx - IP display
app/src/components/IPDisplay.tsx - GitHub link
app/src/components/GitHubLink.tsx
IP API
- IP endpoint
api/api.py - IP resolution
api/api.py
UI support
- Toast state
app/src/hooks/use-toast.ts - Button component
app/src/components/ui/button.tsx - UI primitives
app/src/components/ui
Other components
- Visitor
Connections 11
- Visitor → App entry: opens
- App entry → App shell: renders
app/src/main.tsx - App shell → Home page: routes to
app/src/App.tsx - Home page → IP display: renders
app/src/pages/Index.tsx - Home page → GitHub link: renders
app/src/pages/Index.tsx - IP display → IP endpoint: fetches IP
app/src/components/IPDisplay.tsx - IP endpoint → IP resolution: resolves address
api/api.py - IP resolution → IP endpoint: returns address
api/api.py - IP display → Toast state: reports status
app/src/components/IPDisplay.tsx - IP display → Button component: renders
app/src/components/IPDisplay.tsx - App shell → UI primitives: configures providers
app/src/App.tsx