Skip to content

Commit

Permalink
project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Kennix88 committed Dec 16, 2024
1 parent 03dd135 commit c21c29c
Show file tree
Hide file tree
Showing 17 changed files with 105 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Telegram app/game (Telegram-mini-app) based on the play-to-earn principle.
![GitHub Repo stars](https://img.shields.io/github/stars/Kennix88/HashRateGame?style=for-the-badge&color=0891b2&labelColor=1c1917)
[![wakatime](https://wakatime.com/badge/user/9268c051-c861-45cc-b927-3babf56c56d9/project/8ea93489-247b-4b6c-96db-f1013437caa0.svg?style=for-the-badge&color=0891b2&logoColor=1c1917)](https://github.com/Kennix88/HashRateGame)
![Title](https://img.shields.io/badge/HashRateGame%3A-blue?style=for-the-badge&color=3C5280)
[![Game Telegram Bot](https://img.shields.io/badge/earn-blue?style=for-the-badge&color=0891b2&labelColor=1c1917&logo=telegram&label=Bot)](https://t.me/https://t.me/HashRateGame_bot)
[![Game Telegram Channel](https://img.shields.io/endpoint?style=for-the-badge&color=0891b2&labelColor=1c1917&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2FHashRateGame&label=Community)](https://t.me/https://t.me/HashRateGame)
[![Game Telegram Bot](https://img.shields.io/badge/earn-blue?style=for-the-badge&color=0891b2&labelColor=1c1917&logo=telegram&label=Bot)](https://t.me/HashRateGame_bot)
[![Game Telegram Channel](https://img.shields.io/endpoint?style=for-the-badge&color=0891b2&labelColor=1c1917&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2FHashRateGame&label=Community)](https://t.me/HashRateGame)
[![Game Telegram chat](https://img.shields.io/endpoint?label=Chat&style=for-the-badge&color=0891b2&labelColor=1c1917&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2FHashRateGame_chat)](https://t.me/HashRateGame_chat)
![Title](https://img.shields.io/badge/Me%3A-blue?style=for-the-badge&color=3C5280)
[![Github followers](https://img.shields.io/github/followers/Kennix88?logo=github&style=for-the-badge&color=0891b2&labelColor=1c1917)](https://www.github.com/Kennix88)
Expand Down
2 changes: 1 addition & 1 deletion apps/HashRateGame/specs/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { render } from '@testing-library/react';
import Page from '../src/app/page';
import Page from '../src/app/(public)/page';

describe('Page', () => {
it('should render successfully', () => {
Expand Down
30 changes: 30 additions & 0 deletions apps/HashRateGame/src/app/(public)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Noto_Sans } from 'next/dist/compiled/@next/font/dist/google'
import '../global.css'

const NotoSans = Noto_Sans({
subsets: ['latin', 'cyrillic', 'greek', 'devanagari'],
style: ['normal', 'italic'],
weight: ['100', '200', '300', '400', '500', '600', '700', '800', '900'],
display: 'swap',
variable: '--font-noto-sans',
})

export const metadata = {
title: 'Welcome to hash-rate-game',
description: 'Generated by create-nx-workspace',
}

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body
className={`${NotoSans.variable} bg-black text-white w-screen min-h-screen`}>
{children}
</body>
</html>
)
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function NavBar() {
return (
<div className="bottom-0 left-0 right-0 fixed flex flex-row gap-4 p-4">
NavBar
</div>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <div>Analytics</div>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <div>Friends</div>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <div>Games</div>
}
15 changes: 15 additions & 0 deletions apps/HashRateGame/src/app/(telegram)/app/(main)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import '../../../global.css'
import NavBar from './_components/NavBar'

export default function MainLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<div className="bg-[#17212b] text-white w-screen min-h-screen">
<div className="p-4">{children}</div>
<NavBar />
</div>
)
}
3 changes: 3 additions & 0 deletions apps/HashRateGame/src/app/(telegram)/app/(main)/menu/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <div>Menu</div>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <div>Mining</div>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <div>Rating</div>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <div>Tasks</div>
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import './global.css';
import '../../global.css';

export const metadata = {
title: 'Welcome to hash-rate-game',
description: 'Generated by create-nx-workspace',
title: '#HashRateGame',
description: '#HashRateGame - Telegram mini app',
};

export default function RootLayout({
Expand Down
3 changes: 0 additions & 3 deletions apps/HashRateGame/src/app/api/hello/route.ts

This file was deleted.

14 changes: 9 additions & 5 deletions apps/HashRateGame/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
const { createGlobPatternsForDependencies } = require('@nx/react/tailwind');
const { join } = require('path');
const { createGlobPatternsForDependencies } = require('@nx/react/tailwind')
const { join } = require('path')

/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
join(
__dirname,
'{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}'
'{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}',
),
...createGlobPatternsForDependencies(__dirname),
],
theme: {
extend: {},
extend: {
fontFamily: {
sans: ['var(--font-noto-sans)'],
},
},
},
plugins: [],
};
}
21 changes: 17 additions & 4 deletions apps/HashRateGame/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
Expand All @@ -19,7 +23,10 @@
"name": "next"
}
],
"types": ["jest", "node"]
"types": [
"jest",
"node"
]
},
"include": [
"**/*.ts",
Expand All @@ -28,7 +35,13 @@
"**/*.jsx",
"../../apps/HashRateGame/.next/types/**/*.ts",
"../../dist/apps/HashRateGame/.next/types/**/*.ts",
"next-env.d.ts"
"next-env.d.ts",
".next/types/**/*.ts"
],
"exclude": ["node_modules", "jest.config.ts", "**/*.spec.ts", "**/*.test.ts"]
"exclude": [
"node_modules",
"jest.config.ts",
"**/*.spec.ts",
"**/*.test.ts"
]
}

0 comments on commit c21c29c

Please sign in to comment.