🚄 A modern, responsive Progressive Web App (PWA) that provides real-time train departure information. Built with Next.js and TypeScript, deployed on Vercel.
This project is currently at version 0.1.0.
- The core functionalities for displaying real-time train departure information and station search are implemented.
- 🎯 Project Status
- ✨ Features
- 🛠️ Tech Stack
- 🚀 Getting Started
- 📜 Available Scripts
- 🧹 Linting
- 📱 PWA Installation
- 🤝 Contributing
- 🚉 Real-time train departure information
- 📱 PWA support for mobile installation
- 📍 Station search functionality
- 🚀 Framework: Next.js 15
- 💻 Language: TypeScript
- 🎨 Styling: SASS/SCSS
- 📊 Analytics: Vercel Analytics
- ☁️ Deployment: Vercel
- 📲 PWA Support: next-pwa
- ✅ Node.js 18+
- ✅ npm/yarn/pnpm
-
Clone the repository
git clone https://github.com/julianaijal/where-is-my-train.git cd where-is-my-train
-
Install dependencies
npm install # or yarn install # or pnpm install
-
🔑 Set up environment variables
cp .env.example .env
Next, update the
.env
file with your specific API key. The.env.example
file provides a placeholder:# In .env.example: # Replace with the actual environment variable name and your API key # e.g., NEXT_PUBLIC_TRANSIT_API_KEY=your_actual_api_key_value_here YOUR_TRANSIT_API_KEY=your_api_key_value_here
You'll need to:
- Identify the actual environment variable name your application expects (e.g.,
NEXT_PUBLIC_TRANSIT_API_KEY
). - In your
.env
file, use this actual variable name and set its value to your API key.
Example (in your
.env
file):NEXT_PUBLIC_TRANSIT_API_KEY=your_actual_api_key_from_provider
- Identify the actual environment variable name your application expects (e.g.,
-
▶️ Start the development servernpm run dev # or yarn dev # or pnpm dev
-
🌐 Open http://localhost:3000 in your browser
In addition to the development server, the following scripts are available:
-
Build for production:
npm run build
-
Start production server:
npm run start
To ensure code quality and consistency, this project uses ESLint. You can run the linter with:
npm run lint
Visit where-is-my-train.vercel.app to see the live application.
This app can be installed as a Progressive Web App:
- Visit the website in Chrome/Edge/Safari
- Look for the "Install" or "Add to Home Screen" option
- Follow the prompts to install the app
Contributions to this project are welcome! If you're interested in helping out:
- For significant changes or new features, please open an issue first to discuss your ideas.
- Feel free to fork the repository, create a dedicated branch for your changes, and then submit a Pull Request.
This project uses Dependabot to help keep dependencies up-to-date.