Minimal React app that recreates the look of a Slovak transit ticket inside an iOS Messages-style conversation view.
This project renders a fake ticket/chat screen made of reusable React components. The app generates several time entries, adds a unique message hash to each block, and redraws the list when the browser window regains focus.
The repository appears to be a small front-end experiment or UI clone rather than a full production service. It is deployed with GitHub Pages.
- Live site:
https://wavehs.github.io/sk-ticket-ios - Repository:
https://github.com/wavehs/sk-ticket-ios
- Shows a header, a list of message-like ticket blocks, and a footer.
- Builds ticket timestamps from predefined offsets plus one recent dynamic timestamp.
- Formats dates and times with
moment, including Slovak locale support. - Generates a random per-message hash with
randexpso rendered items have unique React keys. - Refreshes generated messages when the tab/window becomes focused again.
- React 18
- react-scripts 5
- moment
- randexp
- gh-pages
.
├── public/
├── src/
│ ├── assets/
│ ├── components/
│ │ ├── divider/
│ │ ├── footer/
│ │ ├── header/
│ │ ├── message_block/
│ │ ├── my_message/
│ │ └── their_message/
│ ├── util/
│ │ ├── hash.js
│ │ └── time.js
│ ├── App.js
│ ├── index.css
│ ├── index.js
│ └── registerServiceWorker.js
├── package.json
├── package-lock.json
└── yarn.lock
The root component:
- creates a list of fake ticket/message time records,
- enriches every record with a generated hash,
- stores the result in component state,
- re-generates the list on window focus,
- renders the layout through
Header,MessageBlock, andFooter.
This utility:
- imports
momentand the Slovak locale, - defines several fixed ticket offsets,
- adds one recent timestamp based on the current time,
- returns formatted fields such as:
datedivisorDatestartTimeendTimereceivedTime
This utility creates a random message identifier with randexp, used as a React key for rendered blocks.
- Node.js 18+ recommended
- npm
git clone https://github.com/wavehs/sk-ticket-ios.git
cd sk-ticket-ios
npm install
npm startApp runs in development mode at:
http://localhost:3000
npm start
npm run build
npm test
npm run deploynpm start— starts the React development server.npm run build— creates a production build.npm test— runs tests throughreact-scripts.npm run deploy— builds the app and publishesbuild/to GitHub Pages.
The project is configured for GitHub Pages through the homepage field in package.json:
"homepage": "https://wavehs.github.io/sk-ticket-ios"To deploy:
npm run deploy- No backend, persistence, or real ticket validation logic.
- Uses class-based React instead of modern hooks.
- Includes both
package-lock.jsonandyarn.lock; one should be removed for consistency. - Uses
moment, which is considered legacy for many modern front-end projects. .envexists in the repository root and should not be committed if it contains secrets.- The current repository name can be mistaken for a native iOS project, while this is actually a web app.
- Migrate from Create React App to Vite.
- Replace
momentwithdayjsordate-fns. - Convert class components to function components with hooks.
- Add screenshots or GIF previews to this README.
- Document the exact purpose of the ticket mockup.
- Add linting and formatting (
eslint,prettier). - Add real tests for time generation and UI rendering.
- Remove tracked environment files and keep only
.env.exampleif needed.
If .env has ever contained real keys, tokens, or secrets, rotate them immediately and remove the file from version control history.
No license file is currently included in the repository. By default, that means reuse rights are not explicitly granted.
GitHub: @wavehs