Skip to content
Moolan-dPublic

About

Another Chrome New Tab

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Tabr

A Chrome Extension that replaces your new tab page with beautiful, high-resolution photos from Unsplash and Pexels.

Features

  • Dynamic background photos on every new tab
  • Choose between Unsplash and Pexels as your photo source
  • Favorite photos and browse your collection
  • Favorites sync across devices through Chrome sync
  • Carousel mode to rotate through your favorites
  • Pin any photo as a fixed background for every new tab
  • Preloaded image queue for instant transitions
  • Clock with smart greeting messages
  • Debug panel for inspecting queue state

Install from Chrome Web Store

Install Tabr from the Chrome Web Store

Install from Source

git clone https://github.com/Moolan-d/tabr.git
cd tabr
npm install
npm run build

Then load the .output directory as an unpacked extension in Chrome (chrome://extensions/ > Developer mode > Load unpacked).

Configuration

Tabr uses the Unsplash API by default, and can switch to Pexels. Unsplash includes a built-in trial key (limited to 10 requests). For either source, you can configure your own key:

Unsplash

  1. Go to Unsplash Developers and register as a developer.
  2. Visit Your Apps and click on one of your applications to open its details page.
  3. On the application page (https://unsplash.com/oauth/applications/<app-id>), copy the Access Key shown on the page.

Unsplash application access key

  1. Open a new tab in Chrome, click the Settings button (top-right corner), select Unsplash under Source, paste the key into the Unsplash Access Key field, and click Save.

Tabr settings API key input

The new key takes effect immediately — no reload required.

Pexels

  1. Create a free API key at Pexels API.
  2. Open Settings → Source, select Pexels, paste the key, and click Save.

Pexels is optional; the built-in trial key only applies to Unsplash.

Development

# Build once
npm run build

# Watch mode - rebuilds on file changes
npm run dev

Architecture

src/
├── providers/          # Photo source abstraction
│   ├── types.ts        # Photo, PhotoSource, FavoritePhoto interfaces
│   ├── unsplash.ts     # Unsplash PhotoSource implementation
│   ├── pexels.ts       # Pexels PhotoSource implementation
│   └── registry.ts     # Source registration and management
│
├── services/           # Core business logic (no React dependency)
│   ├── cache.ts        # Chrome storage cache with TTL
│   ├── favorites.ts    # Favorites CRUD + random pick for carousel
│   ├── favorites-sync.ts # chrome.storage.sync mirror with tombstones
│   ├── preload-queue.ts # Preloaded image queue (capacity 2, 10min TTL, 3 retries)
│   └── photo-service.ts # Central orchestrator, subscribe/notify state
│
├── hooks/
│   └── usePhotoService.ts  # React bridge via useSyncExternalStore
│
├── components/         # Presentational components
│   ├── Background.tsx
│   ├── BottomBar.tsx
│   ├── Clock.tsx
│   ├── DebugPanel.tsx
│   └── SettingsMenu.tsx
│
└── entrypoints/
    └── newtab/
        └── main.tsx    # Thin shell (~80 lines)

Design principle: React components only subscribe and render. All business logic, caching, and timers live in the service layer.

Adding a New Photo Source

Implement the PhotoSource interface and register it:

import type { PhotoSource, Photo } from './providers/types';
import { sourceRegistry } from './providers/registry';

const mySource: PhotoSource = {
  id: 'my-source',
  label: 'My Source',
  async fetchRandom(): Promise<Photo> {
    // fetch from your API
    return {
      url: '...',
      photographerName: '...',
      photographerLink: '...',
      originalLink: '...',
      source: 'my-source',
    };
  },
};

sourceRegistry.register(mySource);

No changes needed in the service or UI layers.

CI/CD

  • CI: Every pull request runs typecheck and build checks
  • Release: Pushes to main trigger semantic-release, which analyzes commit messages and creates a new version automatically (feat: = minor, fix: = patch)
  • Package: New releases are built and zipped via wxt zip, then attached to the GitHub Release automatically
  • Publish: Submitting to the Chrome Web Store is manual. Run the Release workflow from the Actions tab (workflow_dispatch) with an existing tag, e.g. v1.6.0. It builds that tag and runs wxt submit.

Publishing is deliberately manual: the Chrome Web Store rejects a version that already exists, so it must not fire automatically after a manual upload.

Tech Stack

  • WXT - Browser extension framework
  • React 18 + TypeScript
  • Tailwind CSS
  • Unsplash and Pexels APIs

About

Another Chrome New Tab

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages