• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
Abbietech

Abbietech

SmartRoutes

Public
Like
SmartRoutes
Home
Code
2
backend
1
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
backend
/
database
/
README.md
Code
/
backend
/
database
/
README.md
Search
5/14/2025
Viewing readonly version of main branch: v4
View latest version
README.md

Database Layer

This directory contains the database setup and query functions for the SmartRoutes application.

Files

  • migrations.ts - Contains the database schema definitions and migration functions
  • queries.ts - Contains typed query functions for interacting with the database

Database Schema

Users Table

Stores user account information:

  • id - Primary key
  • email - User's Gmail address (unique)
  • name - User's name (optional)
  • created_at - Account creation timestamp
  • last_login - Last login timestamp

Traffic Reports Table

Stores traffic congestion reports:

  • id - Primary key
  • user_id - Foreign key to users table
  • latitude - Geographic latitude
  • longitude - Geographic longitude
  • congestion_level - Traffic level (1: Light, 2: Moderate, 3: Heavy, 4: Standstill)
  • description - Optional text description
  • created_at - Report timestamp

Locations Table

Stores users' last known locations:

  • id - Primary key
  • user_id - Foreign key to users table
  • latitude - Geographic latitude
  • longitude - Geographic longitude
  • updated_at - Last update timestamp
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.