TechStore Explorer is designed to run on Railway with a three-service architecture that separates the web process, database, and queue worker. This separation keeps HTTP responses fast by offloading async work — such as sending wishlist email notifications — to a dedicated background process, ensuring the web service is never blocked by mail delivery.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Emmanuel-Mtz-777/TechStore-Explorer/llms.txt
Use this file to discover all available pages before exploring further.
Why Railway
Because a direct GitLab–Railway integration was not available for this project, a GitHub mirror repository was created to keep the source code in sync with the original GitLab repository. Railway’s GitHub integration picks up every push to the mirror automatically, triggering a new deployment without any manual intervention.Architecture Overview
The Railway project is composed of three services, each with a single, well-defined responsibility:| Service | Role | Start Command |
|---|---|---|
| Web | Runs the Laravel application and handles all incoming HTTP requests | php artisan serve |
| MySQL | Railway-managed relational database; connection details are injected as environment variables | (managed by Railway) |
| Worker | Continuously processes queued jobs — including wishlist email dispatch | php artisan queue:work |
Environment Variables
All variables below must be set in the Railway dashboard for each applicable service. The Web and Worker services share the same set; the MySQL service exposes its own connection variables automatically.| Variable | Value / Notes |
|---|---|
APP_KEY | Generate with php artisan key:generate --show |
APP_ENV | production |
APP_DEBUG | false |
APP_URL | Railway-assigned public URL (set after first deploy) |
DB_CONNECTION | mysql |
DB_HOST | Provided by Railway MySQL service |
DB_PORT | Provided by Railway MySQL service (default 3306) |
DB_DATABASE | Provided by Railway MySQL service |
DB_USERNAME | Provided by Railway MySQL service |
DB_PASSWORD | Provided by Railway MySQL service |
MAIL_MAILER | smtp |
MAIL_HOST | sandbox.smtp.mailtrap.io |
MAIL_PORT | 2525 |
MAIL_USERNAME | Your Mailtrap SMTP username |
MAIL_PASSWORD | Your Mailtrap SMTP password |
MAIL_ENCRYPTION | tls |
MAIL_FROM_ADDRESS | no-reply@example.com |
MAIL_FROM_NAME | ${APP_NAME} |
QUEUE_CONNECTION | database |
Deployment Steps
Fork or mirror the repository to GitHub
Because Railway integrates with GitHub rather than GitLab, create a GitHub mirror of the TechStore Explorer repository. The mirror must track the
main branch so that Railway can detect new commits and redeploy automatically.Create a new Railway project with three services
In the Railway dashboard, create a new project and add the following services:
- PHP Web — the main Laravel application
- MySQL — a Railway-managed MySQL database
- Worker — a second PHP service that will run the queue worker
Connect the GitHub repository
For both the Web and Worker services, select Deploy from GitHub repo and choose the mirrored TechStore Explorer repository. Set the target branch to
main so both services track the same source.Configure environment variables in the Railway dashboard
Open the Variables tab for the Web service and add every variable from the table above. Railway makes MySQL connection variables available as references (e.g.
${{MySQL.MYSQL_HOST}}), so you can link them directly rather than copy-pasting.Repeat the same variable configuration for the Worker service — it needs identical access to the database and mail credentials.Override the Worker service start command
In the Worker service settings, navigate to Deploy → Start Command and set it to:This overrides the default web-server start command so the Worker container runs the queue processor instead of serving HTTP traffic.
Run database migrations and seeders
Once the MySQL service is ready, open a Railway shell on the Web service (or use a one-off command) and run:This creates all required tables — including the
jobs table used by the queue — and populates the database with initial product and user data.Confirm the deployment and note your public URL
After a successful deploy, Railway assigns a public URL to the Web service (e.g.
https://your-app.up.railway.app). Copy this URL, set it as APP_URL in the Web service variables, and redeploy if needed. The application will be accessible at that address immediately.The Worker service must remain running at all times. If it is stopped or crashes, wishlist email notifications will accumulate in the
jobs database table but will never be delivered until the worker is restarted.