Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
405ecf9
Mucho commits - remove all the Bower dependencies and Dockerize this …
jasonad123 Jun 19, 2025
7e68e33
Merge pull request #1 from jasonad123/de-bower
jasonad123 Jun 19, 2025
38a6566
Package updates
jasonad123 Jun 19, 2025
7fc2101
Fix drag-and-drop functionality
jasonad123 Jun 19, 2025
e0d8930
Remove legacy dependencies (i.e. IE)
jasonad123 Jun 19, 2025
d4ef880
Update README.md
jasonad123 Jun 19, 2025
77f8ace
Create docker-publish.yml
jasonad123 Jun 19, 2025
1a447b8
update docker-publish
jasonad123 Jun 19, 2025
8bad17c
Update docker-publish.yml
jasonad123 Jun 19, 2025
1beff0b
Merge pull request #2 from jasonad123/release
jasonad123 Jun 19, 2025
a20a1c6
Modify navbar with responsive elements
jasonad123 Jun 19, 2025
fa1797c
Changes made after code review for best practice and security
jasonad123 Jun 19, 2025
84cc6d5
Merge pull request #3 from jasonad123/public
jasonad123 Jun 19, 2025
e916c8f
Edit README and compose
jasonad123 Jun 19, 2025
fcefeed
Merge branch 'main' of https://github.com/jasonad123/Transit-TV
jasonad123 Jun 19, 2025
50f91b6
edit gitignore
jasonad123 Jun 19, 2025
7d65a43
Edit README.md
jasonad123 Jun 19, 2025
8e526b7
One more README edit
jasonad123 Jun 19, 2025
d268b8d
Update README.md
jasonad123 Jun 24, 2025
b2686ec
Update README.md
jasonad123 Jun 24, 2025
fb2659c
Added information on CORS configuration
jasonad123 Jun 24, 2025
22e945c
Update README.md to more closely align for PR purposes
jasonad123 Jun 24, 2025
2383380
Remove GitHub actions workflow - this was a personal touch but I'd be…
jasonad123 Jun 24, 2025
1cac1ae
Improve navbar responsiveness and add secondary logo support
jasonad123 Jun 24, 2025
2784a09
apply additional changes to README.MD
jasonad123 Jun 25, 2025
6fd957d
Stopped tracking .env.docker
jasonad123 Jun 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

34 changes: 34 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Git
.git
.gitignore

# Node.js
node_modules
npm-debug.log
.npm

# Bower (legacy)
bower_components

# Build artifacts
dist
.tmp

# Logs
logs
*.log

# Environment files
.env
.env.*
!.env.example

# IDE and editor files
.idea
.vscode
*.swp
*.swo

# OS files
.DS_Store
Thumbs.db
23 changes: 23 additions & 0 deletions .env.docker.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Docker environment configuration

# Application settings
NODE_ENV=production
PORT=8080

# API Keys - Replace with your actual Transit API key
# Get your API key from https://transitapp.com/apis
TRANSIT_API_KEY="YOUR_TRANSIT_API_KEY_HERE"

# Security
# Secret used for session encryption
SESSION_SECRET=transit-screen-secret

# REQUEST_TIMEOUT: API request timeout in milliseconds
REQUEST_TIMEOUT=10000

# CORS Settings
# Comma-separated list of domains allowed to access the API
ALLOWED_ORIGINS=http://localhost:8080

# Logging
LOG_LEVEL=info
36 changes: 36 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Transit TV Application Environment Variables
# Copy this file to .env and fill in the appropriate values

# Application settings
# ---------------------
# NODE_ENV: Set to 'development' for local development, 'production' for production deployment
NODE_ENV=development

# PORT: The port on which the application will run
PORT=8080

# API Keys
# --------
# TRANSIT_API_KEY: Required for accessing the Transit API
# Get your API key from https://transitapp.com/apis
TRANSIT_API_KEY=your_transit_api_key_here

# Security
# --------
# SESSION_SECRET: Secret used for session encryption
# In production, use a strong, unique value
SESSION_SECRET=change_this_to_a_secure_random_string

# REQUEST_TIMEOUT: API request timeout in milliseconds
REQUEST_TIMEOUT=10000

# CORS Settings
# -------------
# ALLOWED_ORIGINS: Comma-separated list of domains allowed to access the API
# Example: http://localhost:8080,https://yourdomain.com
ALLOWED_ORIGINS=http://localhost:8080

# Logging
# -------
# LOG_LEVEL: Minimum level of logs to output (error, warn, info, verbose, debug, silly)
LOG_LEVEL=info
92 changes: 90 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,92 @@
module.exports = {
extends: '../../.eslintrc.json',
parserOptions: {tsconfigRootDir: __dirname},
"env": {
"browser": true,
"node": true,
"es6": true
},
"globals": {
"angular": true,
"moment": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"indent": [
"error",
2,
{ "SwitchCase": 1 }
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-console": [
"warn",
{ "allow": ["warn", "error"] }
],
"no-unused-vars": [
"warn",
{ "vars": "all", "args": "after-used", "ignoreRestSiblings": false }
],
"curly": ["error", "all"],
"eqeqeq": ["error", "always"],
"no-multi-spaces": "error",
"no-trailing-spaces": "error",
"no-var": "warn",
"prefer-const": "warn",
"no-undef": "error",
"no-use-before-define": ["error", { "functions": false }],
"camelcase": ["error", { "properties": "never" }],
"max-len": ["warn", { "code": 100, "ignoreComments": true, "ignoreUrls": true }],
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1 }],
"no-duplicate-imports": "error",
"no-template-curly-in-string": "error",
"no-eval": "error",
"no-implied-eval": "error",
"no-param-reassign": "warn",
"no-return-assign": "error",
"no-self-compare": "error",
"no-throw-literal": "error",
"no-useless-concat": "error",
"prefer-promise-reject-errors": "error",
"radix": "error",
"no-shadow": "warn",
"no-shadow-restricted-names": "error",
"no-useless-return": "error",
"no-with": "error",
"no-useless-escape": "warn",
"no-mixed-spaces-and-tabs": "error",
"no-lonely-if": "warn",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": ["error", "always"],
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"arrow-spacing": "error",
"no-confusing-arrow": "error",
"no-useless-computed-key": "error",
"no-useless-rename": "error",
"no-var": "warn",
"prefer-const": "warn",
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"rest-spread-spacing": ["error", "never"],
"template-curly-spacing": "error"
}
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ web_modules/
.env.test.local
.env.production.local
.env.local
.env.docker

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM node:18-alpine AS builder

# Set working directory
WORKDIR /app

# Install pnpm
RUN npm install -g pnpm

# Copy package files
COPY package.json pnpm-lock.yaml ./

# Install dependencies
RUN pnpm install

# Copy the rest of the code
COPY . .

# Build the app (continue even if there are warnings)
RUN pnpm build || echo "Build completed with warnings"

# Production stage
FROM node:18-alpine

WORKDIR /app

# Install pnpm
RUN npm install -g pnpm

# Copy the built app and necessary files from the builder stage
COPY --from=builder /app/client ./client
COPY --from=builder /app/server ./server
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/pnpm-lock.yaml ./pnpm-lock.yaml

# Install production dependencies only
RUN pnpm install --prod

# Set environment to production
ENV NODE_ENV=production
ENV PORT=8080

# Expose the port
EXPOSE 8080

# Start the app
CMD ["node", "-r", "dotenv/config", "server/app.js"]
Loading