Skip to content

Commit 473ca03

Browse files
authored
feat! better mobile support - remove light mode - reduce footprint
Refactor version state, lazy load effects, add Docker setup
2 parents 180a997 + 8fa7206 commit 473ca03

20 files changed

+193
-229
lines changed

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
npm-debug.log
3+
Dockerfile
4+
.dockerignore
5+
docker-compose.yml
6+
.git
7+
.gitignore
8+
.next
9+
out

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Build Next.js app and run in production mode
2+
FROM node:20-alpine AS builder
3+
WORKDIR /app
4+
COPY package*.json ./
5+
RUN npm ci
6+
COPY . .
7+
RUN npm run build
8+
RUN npm prune --omit=dev
9+
10+
FROM node:20-alpine AS runner
11+
WORKDIR /app
12+
ENV NODE_ENV=production
13+
COPY --from=builder /app .
14+
EXPOSE 3000
15+
CMD ["npm", "start"]

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ npm run dev
6969

7070
Open [http://localhost:3000](http://localhost:3000) to see the app.
7171

72+
### Docker
73+
74+
Build and run the app in a container:
75+
76+
```bash
77+
docker compose up --build
78+
```
79+
80+
Visit <http://localhost:3000> once the server starts.
81+
7282
## Deployment
7383

7484
**Currently deployed on Cloudflare Pages** at [semver.agenticinsights.com](https://semver.agenticinsights.com)

app/IDELayout.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,19 @@ export default function IDELayout({ children }: IDELayoutProps) {
3939

4040
const [terminalOpen, setTerminalOpen] = useState(false);
4141
const [sidebarOpen, setSidebarOpen] = useState(false);
42-
const [currentTime, setCurrentTime] = useState(new Date());
42+
const [currentTime, setCurrentTime] = useState<string>("");
4343

4444
useEffect(() => {
45-
const timer = setInterval(() => {
46-
setCurrentTime(new Date());
47-
}, 1000);
45+
const updateTime = () =>
46+
setCurrentTime(
47+
new Date().toLocaleTimeString("en-US", {
48+
hour: "2-digit",
49+
minute: "2-digit",
50+
})
51+
);
4852

53+
updateTime();
54+
const timer = setInterval(updateTime, 1000);
4955
return () => clearInterval(timer);
5056
}, []);
5157

@@ -216,7 +222,7 @@ export default function IDELayout({ children }: IDELayoutProps) {
216222
main
217223
</span>
218224
<span className="text-emerald-400">● Port 30020</span>
219-
<span className="text-gray-500">{currentTime.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit' })}</span>
225+
<span className="text-gray-500">{currentTime || '--:--'}</span>
220226
</div>
221227
</div>
222228
)}

0 commit comments

Comments
 (0)