Skip to content

Repository files navigation

Bringing Back Windows 95 Calculator (for the web)

Reviving classic software in the browser is fun, nostalgic, and keeps UI history alive for modern devs.

Windows 95 calculator UI

  • API reference: see docs/API.md.
  • License: MIT.

Project structure (simple overview)

  • src/ holds the library source (components/, hooks/, engine/, types/).
  • example/ is a Vite + React + TypeScript demo that consumes the library from the repo root.
  • src/Win95Calculator.tsx re-exports the public API.

Developing

  • Install deps: yarn install.
  • Run dev server: yarn dev.
  • Type check: yarn tsc.
  • Tests: yarn test.
  • Library output is peer-based (react95 external). Build: yarn build:lib:peerdist/lib-peer (types in dist/types).

Using bundled vs peer output in Vite

Default import resolves to the peer build. If you’re consuming straight from the repo, alias to it:

// vite.config.ts
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'node:path';

export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      windows95_calculator_react: path.resolve(__dirname, './dist/lib-peer/index.js'),
    },
  },
});

When published, consumers can do:

  • import CalculatorWindow from 'windows95_calculator_react'; (peer react95 expected)

Code style (keep it easy)

  • Use TypeScript + React.
  • Prefer small components and shared hooks.
  • Keep styling in styled-components and match the Win95 look.

Example

  • Open example/ and run yarn install && yarn dev to try the calculator as a consumer app.

License

  • MIT (see LICENSE).

Note

  • Some functions might not be perfect yet; PRs to fix or improve behavior are very welcome!
  • Using styled-components v6 with react95 v4 can log prop-forwarding warnings (e.g., fullWidth, active). Functionality remains intact; keep it in mind when checking console output.

About

This project is ought to be a perfect Windows95 Calculator replica

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages