Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
6 changes: 6 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"default": true,
"MD013": false,
"MD033": false
}

2 changes: 2 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
README.md

53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,52 @@
# athena-hacker-house
# athena-hacker-house
<video controls muted playsinline loop width="720">
<source src="public/demo.mp4" type="video/mp4" />
Your browser does not support the video tag. Here is a <a href="public/demo.mp4">link to the video</a>.
</video>
Monad Mines (3x3) — Next.js + TypeScript
=================================================

Play a simple 3x3 Mines-style game. Find the 💎 within 3 tries to trigger a simulated "Swap on Monad" via a Next.js API route.

Tech stack
---------------------------------
- **Frontend**: React (Next.js App Router)
- **Language**: TypeScript
- **API**: Next.js Route Handler (`/api/swap`)

Getting started
---------------------------------
1. Install dependencies:

```bash
npm install
```

2. Run the dev server:

```bash
npm run dev
```

3. Open `http://localhost:3000` in your browser.

How it works
---------------------------------
- The board is a 3x3 grid. A random cell is selected to contain the diamond on each reset.
- You have 3 tries. Click a cell to reveal:
- Hidden → ❓
- Miss → ❌
- Diamond → 💎
- If you find the diamond within 3 clicks, the app calls `POST /api/swap` to simulate a swap on the Monad chain and returns a fake `txHash`.

Project structure
---------------------------------
- `src/app/page.tsx`: Game UI and logic, triggers the swap on win.
- `src/app/api/swap/route.ts`: Simulated Monad swap endpoint.
- `src/app/layout.tsx`, `src/app/globals.css`: App shell and styles.

Notes
---------------------------------
- The swap is simulated; integrate a real Monad SDK or RPC to perform an actual on-chain swap.
- Reset the game anytime with the Reset button.
# monad-mines
26 changes: 26 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
{
ignores: [
"node_modules/**",
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
"README.md",
],
},
];

export default eslintConfig;
7 changes: 7 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
};

export default nextConfig;
Loading