Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2126 commits
Select commit Hold shift + click to select a range
93a83ec
Refactor Tools backend and client to use the new `MCPClientManager` (…
matteo8p Oct 10, 2025
961d1bc
Prevent user from using the same id (#626)
matteo8p Oct 10, 2025
3c432e9
use ids over names (#628)
chelojimenez Oct 11, 2025
09b5483
pass URL objects to new client
chelojimenez Oct 11, 2025
df5ad23
Use new client manager for Apps SDK (#629)
chelojimenez Oct 11, 2025
f4a60ba
Add server actions view (#630)
chelojimenez Oct 11, 2025
72bfb15
Remove open ai component render unused props (#621)
matteo8p Oct 12, 2025
7c8e68c
add ping, and handle disconnect / reconnect (#627)
matteo8p Oct 12, 2025
2763d68
replace mastra (#631)
matteo8p Oct 12, 2025
dc696ed
Migrate prompts (#632)
matteo8p Oct 12, 2025
7d66a53
Migrate resources tab (#633)
matteo8p Oct 12, 2025
49fbb2f
resources
Oct 12, 2025
efd937c
export migration (#634)
matteo8p Oct 12, 2025
4a6f7d4
Fix reconnect logic (#635)
matteo8p Oct 12, 2025
c395de7
Migrate chat over (#636)
matteo8p Oct 12, 2025
efb354a
Conver http adapters to new MCPClientMangaer
Oct 12, 2025
0272c3c
Migrate evals to mcpClientManager (#637)
matteo8p Oct 12, 2025
b05a347
Fully migrate off of MCPJamClientManager (#638)
matteo8p Oct 12, 2025
68d08bf
feat: Auto-open browser when starting Inspector via npx (#620)
Agastya18 Oct 12, 2025
d0c2e4a
restore last selected modal on playground
chelojimenez Oct 13, 2025
556609a
Fix disconnect logic (#639)
matteo8p Oct 13, 2025
6eb1894
client: enhance text sanitization in chat-utils (#605)
pyoneerC Oct 13, 2025
6288499
bump
Oct 13, 2025
bedc194
Mcp client manager (#640)
matteo8p Oct 13, 2025
04176e5
t
Oct 13, 2025
9f3d4c5
Fix imports for MCPClientManager (#641)
matteo8p Oct 13, 2025
35781ac
log json-rpc messages (#643)
matteo8p Oct 14, 2025
01188dd
Improved error handling (#644)
matteo8p Oct 14, 2025
058fdde
Save widgets locally (#645)
chelojimenez Oct 14, 2025
de0c1e7
prettier
chelojimenez Oct 14, 2025
bcdf468
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 14, 2025
47364e8
generate unique tool call ids
chelojimenez Oct 14, 2025
a66dc86
store data first
chelojimenez Oct 14, 2025
730c992
prettier
chelojimenez Oct 14, 2025
6bdf777
v1.0.6
chelojimenez Oct 14, 2025
8405236
Correct env variable checks (#646)
matteo8p Oct 14, 2025
38e6cf9
logger (#648)
matteo8p Oct 14, 2025
67d55c7
Fix workflows for new sdk (#647)
chelojimenez Oct 15, 2025
5f064e5
handling tool call output in results panel
chelojimenez Oct 15, 2025
41bac79
prettier
chelojimenez Oct 15, 2025
e430183
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 15, 2025
1089486
v1.0.7
chelojimenez Oct 15, 2025
ace359e
rm sdk as external
chelojimenez Oct 15, 2025
47e4586
v1.0.8
chelojimenez Oct 15, 2025
ab71173
fix
Oct 15, 2025
257e2e8
Switch to port 6274 (#651)
matteo8p Oct 15, 2025
7c47700
Update development server URL to localhost:6274
chelojimenez Oct 15, 2025
b3e7816
Improve app_launched event (#655)
matteo8p Oct 15, 2025
23cc945
t
Oct 15, 2025
8bbdab3
Save auth config if failed connection (#654)
chelojimenez Oct 15, 2025
1fd72de
Json rpc tab 1 (#656)
matteo8p Oct 16, 2025
f1af7df
stop tracking npm cache and node modules
chelojimenez Oct 17, 2025
53c0c3d
Prettier (#665)
matteo8p Oct 17, 2025
042703c
Add gitignore and rebuild (#666)
matteo8p Oct 17, 2025
743950f
gitignore
Oct 17, 2025
8293ea7
remove dist and node_mods
Oct 17, 2025
4c5ad49
move docs to monorepo
chelojimenez Oct 18, 2025
3cb6951
Add contributing section
chelojimenez Oct 18, 2025
6d0ca3a
add changelog
chelojimenez Oct 18, 2025
3747d07
fix(docker): Use package-lock for reproducible builds and fix missing…
mgoldsborough Oct 18, 2025
9448e96
fix(client): add bottom spacer to ToolsSidebar so last item can scrol…
Fikri-20 Oct 19, 2025
ec33e98
Resolve module resolution, env loading, and UI styling issues (#660)
Agastya18 Oct 19, 2025
76bdd54
add oauth architecture docs
chelojimenez Oct 19, 2025
69010dc
README (#675)
matteo8p Oct 19, 2025
6a53e95
fix(client): prevent DOM changes on Playground message hover (#677)
chelojimenez Oct 19, 2025
3b18d81
move everything to sidebar
chelojimenez Oct 20, 2025
56f1a0a
add contributing to documentation
chelojimenez Oct 20, 2025
9bdd757
fix: convert playground chat to flex layout to constrain height (#672)
chelojimenez Oct 20, 2025
da1eca3
consolidate on one contributing section
chelojimenez Oct 20, 2025
34e80a9
move docs server
chelojimenez Oct 20, 2025
c667ef3
evals nit
chelojimenez Oct 20, 2025
5e9e10c
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 20, 2025
31e1b20
share contributing code
chelojimenez Oct 20, 2025
1dab4a1
rm duplicate setup
chelojimenez Oct 20, 2025
bde6b6e
fix broken links
chelojimenez Oct 20, 2025
6250924
add initial client manager docs
chelojimenez Oct 20, 2025
23cd34c
add initial playground architecture
chelojimenez Oct 20, 2025
8b8d3ab
add cappabilities docs
chelojimenez Oct 20, 2025
a601f27
Change docs (#679)
matteo8p Oct 20, 2025
1cd011d
add evals docs
chelojimenez Oct 20, 2025
bb91f60
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 20, 2025
4d47516
add system arch + openai sdk
chelojimenez Oct 20, 2025
1d5d1f6
Move loading screens to its own components (#680)
matteo8p Oct 20, 2025
b9ece4b
fix: mpc-ui rendering in playground (#662)
aiorga-sherpas Oct 20, 2025
71e4003
Servers tab analytics (#682)
matteo8p Oct 21, 2025
00c455b
Login screen on load if user is not authenticated (#681)
matteo8p Oct 21, 2025
b9ac0bb
llm playground analytics (#683)
matteo8p Oct 21, 2025
736d1c1
Tools tab analytics (#684)
matteo8p Oct 21, 2025
2e278c5
Modify sign in buttons logging (#685)
matteo8p Oct 21, 2025
a71264f
tools tab viewed
Oct 21, 2025
022396a
llm playground analytics (#686)
matteo8p Oct 21, 2025
824679d
package
Oct 21, 2025
dd8e37a
use same styles for create account
chelojimenez Oct 21, 2025
00e6652
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 21, 2025
61014a0
add mintlify agent
chelojimenez Oct 21, 2025
e5cdedc
Bundle all dependencies (#689)
chelojimenez Oct 21, 2025
a7a4b30
Change forge config for local builds (#688)
matteo8p Oct 21, 2025
ce36fef
1.0.15
Oct 21, 2025
a608a4c
Fix eval-runner.tsx: preserve comma entries when editing tool calls (…
chelojimenez Oct 21, 2025
a6bde04
add toolResponseMetadata
chelojimenez Oct 21, 2025
36dc56e
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 21, 2025
7fc0ac3
add openExternal
chelojimenez Oct 21, 2025
96c04a4
feat: Add LiteLLM Proxy support (#653)
danilakossygin Oct 21, 2025
2fdc525
v1.0.16
chelojimenez Oct 21, 2025
dc9fd37
Clean up sdk (#695)
matteo8p Oct 21, 2025
cba0217
Clean sdk a bit (#696)
matteo8p Oct 21, 2025
f0b6f58
chore: fix structured output view (#693)
khandrew1 Oct 21, 2025
bfb589a
Update SDK path reference in MCPClientManager documentation (#697)
mintlify[bot] Oct 21, 2025
22735f7
feat: Add Mistral AI support to MCPJam Inspector (#692)
chelojimenez Oct 21, 2025
a2690ca
Add Mistral AI provider documentation (#701)
mintlify[bot] Oct 21, 2025
4667d62
Fix graphs in Contributing
chelojimenez Oct 21, 2025
48ab4b4
change contributing md (#707)
matteo8p Oct 21, 2025
f4561cc
Add gpt 5 models (#708)
chelojimenez Oct 21, 2025
e8896a7
Add frontier models to UI (#710)
chelojimenez Oct 22, 2025
b4022cb
add mistral to package.json
chelojimenez Oct 22, 2025
8cbbabd
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 22, 2025
cac6d5d
Documentation: Add GPT-5 model support and error handling improvement…
mintlify[bot] Oct 22, 2025
b77381c
Improve playground tab sign up (#711)
matteo8p Oct 22, 2025
67611a1
rename to frontier models (#712)
matteo8p Oct 22, 2025
a802e8c
make jRPC scrollable
chelojimenez Oct 22, 2025
1c833e3
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 22, 2025
c1fd3f1
Fix multi toolcall display in chat (#713)
chelojimenez Oct 22, 2025
69f0eed
bump
Oct 22, 2025
e26b32c
Merge branch 'main' of github.com:MCPJam/inspector
Oct 22, 2025
70a4f28
Build header and ipc (#715)
matteo8p Oct 22, 2025
ee95547
only show connected servers
chelojimenez Oct 22, 2025
fd923bf
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 22, 2025
cc3397a
Pass toolResponseMetadata to the widget store API
chelojimenez Oct 23, 2025
b42de70
codeblock nits
chelojimenez Oct 23, 2025
d82e2d3
v1.0.18
chelojimenez Oct 23, 2025
77af064
remove mdx
Oct 24, 2025
0464d4d
Check connection with ping every time (#721)
matteo8p Oct 24, 2025
c85680e
Check connection with ping every time (#724)
matteo8p Oct 24, 2025
c92f0bf
Make connect / reconnect more stable (#723)
matteo8p Oct 24, 2025
d13037e
Revert "Fix multi toolcall display in chat (#713)"
Oct 24, 2025
d5ce03e
1.0.19
Oct 24, 2025
d8ecb80
feat: add OpenRouter provider (#718)
khandrew1 Oct 24, 2025
44fb48d
Build it
Oct 25, 2025
7fcbfdf
Base of ChatV2 (#733)
matteo8p Oct 26, 2025
d4c2939
Change dark mode bg to match app bg (#738)
zacksmash Oct 26, 2025
3ddcd4b
Free chat for LLM playground v2 (#735)
matteo8p Oct 26, 2025
d842d4a
fix: inject theme + initialize userAgent (#740)
chelojimenez Oct 26, 2025
b4ed9b0
fix(client): add hover styling for Tools tab (#737)
vikramsingh117 Oct 26, 2025
ba63d1f
Handle theme updates from inspector into the iframe for MCP apps (#743)
zacksmash Oct 27, 2025
85416bf
bump sdk
chelojimenez Oct 27, 2025
53d9831
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 27, 2025
f42f5d7
Copy over layout to the playground (#744)
matteo8p Oct 27, 2025
01bab2b
prettier
chelojimenez Oct 27, 2025
6b93e25
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 27, 2025
39dce13
Oauth tab revamp (#748)
chelojimenez Oct 27, 2025
46e76af
allow multi select for chat v2
chelojimenez Oct 27, 2025
dc04410
fix: Issues with certain scenes being unresponsive to scrolling or te…
hcl-z Oct 27, 2025
adb6234
Allow structured content to be null, if none is returned (#739)
zacksmash Oct 27, 2025
ba3dd57
Move the resources result to the results panel (#749)
zacksmash Oct 27, 2025
f2067b6
send authed mcp requests
chelojimenez Oct 27, 2025
963c246
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 27, 2025
3191e60
use popups for debug flow
chelojimenez Oct 27, 2025
87c9a86
add decoded jwt
chelojimenez Oct 27, 2025
62675f6
close immediately after code is received
chelojimenez Oct 27, 2025
c6dce83
add flow info section
chelojimenez Oct 27, 2025
71833c4
feat: Add new chat input for Playground V2 (#750)
khandrew1 Oct 27, 2025
b326a1f
add more info logs
chelojimenez Oct 27, 2025
c47b43f
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 27, 2025
ccbaeff
allow http ASs
chelojimenez Oct 27, 2025
c20ede1
nit
chelojimenez Oct 27, 2025
1d75ea3
only exchange code once
chelojimenez Oct 27, 2025
9f688fd
prettier
chelojimenez Oct 27, 2025
4ec9941
request refresh tokens
chelojimenez Oct 27, 2025
7cd8608
add advanced scopes
chelojimenez Oct 28, 2025
dd968bc
allow custom headers
chelojimenez Oct 28, 2025
9bea7f1
mark completion
chelojimenez Oct 28, 2025
6a6af01
add protocol revision
chelojimenez Oct 28, 2025
82bf89a
use debug proxy endpoint + send correct headers
chelojimenez Oct 28, 2025
7996384
nit
chelojimenez Oct 28, 2025
39c441b
prettier
chelojimenez Oct 28, 2025
85120d0
Chat v2 confirm model change dialog (#753)
zhuminghui17 Oct 28, 2025
b6cdb5d
Create thread components (part 1) (#752)
matteo8p Oct 28, 2025
625d634
Added BroadcastChannel listener
chelojimenez Oct 28, 2025
925efa8
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 28, 2025
c6cc2e3
prettier
chelojimenez Oct 28, 2025
7187df9
send init + display protocol info
chelojimenez Oct 28, 2025
a8de537
prettier
chelojimenez Oct 28, 2025
66bc420
prettier
chelojimenez Oct 28, 2025
865c3f3
add body to requests
chelojimenez Oct 28, 2025
229eadd
add beta tag
chelojimenez Oct 28, 2025
36d45f5
improve isOAuthServer for selector
chelojimenez Oct 28, 2025
83337cf
add client secret
chelojimenez Oct 28, 2025
e7b60e5
Improve OAuth detection for Main Flow
chelojimenez Oct 28, 2025
ea97129
share connection card + add pre registration
chelojimenez Oct 28, 2025
898006c
fix double encoding issue
chelojimenez Oct 28, 2025
c48a215
Add request timeout configuration to ServerModal and related types (#…
Agastya18 Oct 28, 2025
c1f54dd
Timeout UI nits & openai iframe nits (#756)
matteo8p Oct 28, 2025
f4517af
electron should read from local
chelojimenez Oct 28, 2025
ba82de7
Playground UI 3 (#758)
matteo8p Oct 28, 2025
d6873d2
Playground tool UI (#759)
matteo8p Oct 28, 2025
068f281
1.0.21
Oct 28, 2025
e8dc2fa
Implement mcp-ui correctly. (#760)
matteo8p Oct 29, 2025
49c136c
feat: Add system prompt and temperature to Chat V2 (#754)
khandrew1 Oct 29, 2025
690cd4c
Pass system prompt over to the free chat backend (#762)
matteo8p Oct 29, 2025
e46c8d4
Fix chat model state bug (#764)
matteo8p Oct 29, 2025
6c300bf
Clear chat on server selector (#769)
matteo8p Oct 30, 2025
9afad51
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Oct 30, 2025
6e52c2f
Render OpenAI apps in the Playground V2 (#773)
matteo8p Oct 30, 2025
ef8be5a
feat: add markdown support (#776)
khandrew1 Oct 31, 2025
8918dfc
Serialize tool result (#778)
matteo8p Oct 31, 2025
c575f45
Add november spec support (#780)
chelojimenez Nov 2, 2025
061e66a
Improve oauth flow zoom (#782)
chelojimenez Nov 3, 2025
9757baf
chore: add landing elements to Chat V2 (#783)
khandrew1 Nov 3, 2025
c8e9df3
Make disabled state of the LLM playground v2 better (#784)
matteo8p Nov 3, 2025
88d5b1f
Posthog to chat-v2 (#785)
matteo8p Nov 3, 2025
47bdad1
fix: remove duplicate close button in MCP server detail modal (#781)
Agastya18 Nov 3, 2025
71bf4ec
Hide OG chat in the sidebar (#786)
matteo8p Nov 3, 2025
50809cf
chore: add error handling to chat (#787)
khandrew1 Nov 3, 2025
73ec4c0
keep widgets routing inside iframe (#788)
chelojimenez Nov 3, 2025
403af30
ChatTabV2 (#789)
matteo8p Nov 3, 2025
0746308
Use new server endpoint v2 (#791)
chelojimenez Nov 3, 2025
0c01ec3
rm logs
chelojimenez Nov 3, 2025
d68dee9
widget rerender nit
chelojimenez Nov 3, 2025
b3ccaf5
animation nit
chelojimenez Nov 3, 2025
f63af04
chore: add persistant model selector (#792)
khandrew1 Nov 4, 2025
3bd40f7
chore: fix gpt 5 models (#794)
khandrew1 Nov 4, 2025
8f64aff
add callback to steam response
chelojimenez Nov 4, 2025
5ad2c0c
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Nov 4, 2025
7e9ad79
nit
chelojimenez Nov 4, 2025
78629ca
Document GPT-5 temperature limitation (#796)
mintlify[bot] Nov 4, 2025
f8738fb
Update OpenAI SDK Architecture Documentation (#793)
mintlify[bot] Nov 4, 2025
6e7d7c6
Consolidate package.json to a single package (#797)
matteo8p Nov 4, 2025
0d9f196
prettier
chelojimenez Nov 4, 2025
cb8775d
1.0.24 package
Nov 4, 2025
1074939
Merge branch 'main' of github.com:MCPJam/inspector
Nov 4, 2025
ccc49b1
update mac release
chelojimenez Nov 4, 2025
3db945a
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Nov 4, 2025
2e64c92
improve server connection modal
chelojimenez Nov 4, 2025
ab4e443
show oauth tokens
chelojimenez Nov 4, 2025
d1e97d2
show decoded JWT tokens
chelojimenez Nov 4, 2025
afc81a8
serverdetailmodal -> servermodal
chelojimenez Nov 4, 2025
b569ec2
show URL in http history
chelojimenez Nov 4, 2025
9319aac
nits
chelojimenez Nov 4, 2025
fa975cd
resize console output
chelojimenez Nov 4, 2025
5223fdc
add final node/edge of diagram
chelojimenez Nov 4, 2025
4f4803a
show ready to authorize in the correct node
chelojimenez Nov 4, 2025
947365f
nits
chelojimenez Nov 4, 2025
35dc733
name nit
chelojimenez Nov 4, 2025
b9f3ff8
name nit
chelojimenez Nov 4, 2025
31ec7c2
Fix types for OAuth State Machine (#799)
matteo8p Nov 4, 2025
3c115cf
Add june spec support (#801)
chelojimenez Nov 5, 2025
a075dc9
Merge branch 'main' of github.com:MCPJam/inspector
chelojimenez Nov 5, 2025
c04dbbc
Refactor Oauth Flow tab (#803)
chelojimenez Nov 5, 2025
c6743ec
Connect Modal Refactor (#804)
chelojimenez Nov 5, 2025
3b110da
feat: Add Amazon Bedrock provider support with AWS credentials config…
Agastya18 Oct 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
380 changes: 380 additions & 0 deletions .claude/mastra-llms.txt

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Dependencies
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Production builds (will be built inside container)
.next/
dist/
build/

# Environment and config files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

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

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Git
.git
.gitignore

# Docker
Dockerfile
.dockerignore
docker-compose*.yml

# Documentation
*.md
docs/

# Test files
coverage/
.nyc_output
__tests__/
**/*.test.ts
**/*.test.js
**/*.spec.ts
**/*.spec.js

# Temporary files
tmp/
temp/

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Claude/AI related
.claude/
claude-code-prompts/
7 changes: 7 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
VITE_CONVEX_URL=https://exuberant-albatross-496.convex.cloud
CONVEX_URL=https://exuberant-albatross-496.convex.cloud
VITE_WORKOS_CLIENT_ID=client_01K4C1TVA6CMQ3G32F1P301A9G
VITE_WORKOS_REDIRECT_URI=mcpjam://oauth/callback
CONVEX_HTTP_URL=https://exuberant-albatross-496.convex.site
ENVIRONMENT=local
VITE_DISABLE_POSTHOG_LOCAL=true
8 changes: 8 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
VITE_CONVEX_URL=https://outstanding-fennec-304.convex.cloud
CONVEX_URL=https://outstanding-fennec-304.convex.cloud
VITE_WORKOS_CLIENT_ID=client_01K4C1TVPBE7JTBFQJF9SDW9P9
VITE_WORKOS_REDIRECT_URI=mcpjam://oauth/callback
CONVEX_HTTP_URL=https://outstanding-fennec-304.convex.site
ENVIRONMENT=production
PORT=6274
VITE_DISABLE_POSTHOG_LOCAL=false
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/docker-build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docker Release

on:
workflow_dispatch:
push:
tags: ["v*"]

env:
DOCKER_REPOSITORY: mcpjam/mcp-inspector

jobs:
build-and-push:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REPOSITORY }}
tags: |
type=ref,event=branch
type=sha
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64
build-args: |
BUILDKIT_INLINE_CACHE=1
70 changes: 70 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Prettier and Build Check

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
prettier-and-build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: |
# Clean npm cache
npm cache clean --force

# Remove lock files and node_modules to ensure fresh install
rm -rf package-lock.json node_modules
rm -rf client/package-lock.json client/node_modules
rm -rf server/package-lock.json server/node_modules

# Install all dependencies (root + client + server)
npm install --legacy-peer-deps
cd client && npm install --legacy-peer-deps && cd ..
cd server && npm install --legacy-peer-deps && cd ..

- name: Check Prettier formatting
run: |
if ! npx prettier --check .; then
echo "❌ Code is not properly formatted!"
echo ""
echo "To fix this, run:"
echo " npm run prettier-fix"
echo ""
echo "Then commit and push the changes."
exit 1
else
echo "✅ All files are properly formatted!"
fi

- name: Build project
run: |
echo "🏗️ Building project..."
npm run build
echo "✅ Build completed successfully!"

- name: Test production start
run: |
echo "🧪 Testing production start..."
timeout 3s npm start || EXIT_CODE=$?
if [ $EXIT_CODE -eq 124 ]; then
echo "✅ Production server started successfully (timed out as expected)"
exit 0
elif [ $EXIT_CODE -eq 0 ]; then
echo "✅ Production server started successfully"
exit 0
else
echo "❌ Production server failed to start with exit code $EXIT_CODE"
exit 1
fi
Loading