Vetner is a Ruby on Rails platform that helps pet owners in Singapore connect with Singapore Veterinary Association registered clinics, manage their pets' medical history, and collaborate with their preferred veterinarians. The application combines a searchable clinic directory with personal health records so that owners and vets share the same up-to-date information. Interactive maps powered by OneMap, Mapbox, and Leaflet make it easy to locate nearby clinics, while secure authentication ensures that pet owners and veterinary staff each see the tools tailored to their role.
- Interactive vet discovery map – Explore clinic locations plotted on a Leaflet map that uses OneMap basemaps and Mapbox markers. Signed-in owners can filter clinics by walking distance using a slider that is pre-filled with travel times calculated from stored home coordinates, while everyone can filter for 24-hour emergency providers and run full-text searches by clinic name, address, or postal code.
- Dual authentication flows – Devise manages separate sign-in and sign-up paths for pet owners (
User) and veterinary clinics (Vet). Onboarding automatically creates the corresponding profile records so each account can complete its details right after registration. - Owner profiles with location awareness – Owners maintain contact details, upload a profile image via Active Storage, and save their address. Postal codes are validated through the OneMap API to capture latitude and longitude, which power distance calculations on the map and clinic pages.
- Pet health records – Owners can register multiple pets, attach photos, and log visit histories. Pet records store titles, visit dates, and narrative notes, giving both owners and authorised vets a timeline of care.
- “My Vets” relationship management – Owners can add clinics from the directory to a personal list. The association is bidirectional, so vets instantly see which clients and pets are linked to their practice when they sign in.
- Vet clinic dashboard – Veterinary users view their clinic profile, edit contact details, and see a tabular list of associated clients with phone numbers, pet types, and links to each animal’s record.
- Contact and admin tools – Prospective clinics can reach the team through a MailForm-powered contact form, while administrative users can access a RailsAdmin dashboard at
/adminto manage data directly.
- Ruby 2.5.1
- Rails 5.2.x
- PostgreSQL 9.1+
- Node.js and Yarn (for managing JavaScript and CSS assets bundled through the Rails asset pipeline)
- Clone the repository
git clone https://github.com/reshinto/vetner.git cd vetner - Install Ruby dependencies
bundle install
- Install JavaScript dependencies (if Yarn reports "nothing to install" it simply means the existing packages are already satisfied)
yarn install
- Configure environment variables
Create a
.envfile (the project usesdotenv-railsin development) and provide the credentials used by the app:These values support the contact form (SMTP delivery) and the map integrations.GMAIL_USERNAME=[email protected] GMAIL_PASSWORD=your_email_password ONEMAPTOKEN=your_onemap_api_token MAPBOXTOKEN=your_mapbox_api_token
- Set up the database
rails db:create rails db:migrate
- (Optional) Seed sample data
Seeding creates admin users, example pet owners, and a catalogue of clinics with location data fetched from OneMap.
rails db:seed
Start the Rails server and visit http://localhost:3000 in your browser:
rails serverIf you seeded the database, sign in with one of the generated admin accounts and navigate to http://localhost:3000/admin to manage records through RailsAdmin.
app/models– ActiveRecord models for users, vets, profiles, pets, and pet records, including theVetProfile.search_vet_profilesfull-text search scope powered bypg_search.app/controllers– RESTful controllers coordinating authentication, profile management, pet CRUD operations, vet relationship actions, map feeds, and the contact form.app/views– ERB templates for the landing page carousel, Leaflet map, profile dashboards, pet record tables, and modal forms used across the site.config/routes.rb– Declares Devise routes for both account types, the resource endpoints, custom actions for linking vets to users, contact form routes, and the mounted RailsAdmin engine.db/seeds.rb– Populates example accounts and clinic data (including emergency flags and coordinates) to explore the app without manual entry.
- Use
rails testto execute the default test suite. - Active Storage is configured for local disk storage by default; update
config/storage.ymlif you plan to use a different service in production. - Map features rely on browser
sessionStoragefor caching distance calculations. Clear site data if you need to reset cached values during development.


