feat: initialize pnpm workspace, TypeScript configuration, and Turbo tasks
- Added pnpm-workspace.yaml to manage workspace packages and dependencies. - Created tsconfig.json with strict TypeScript settings for better type safety. - Introduced turbo.json to define build, lint, test, and other tasks with dependencies.
@@ -0,0 +1,11 @@
|
|||||||
|
# ── Shared ──
|
||||||
|
NODE_ENV=development
|
||||||
|
|
||||||
|
# ── API (NestJS) ──
|
||||||
|
API_PORT=3001
|
||||||
|
|
||||||
|
# ── Frontend (Next.js) ──
|
||||||
|
NEXT_PUBLIC_API_URL=http://localhost:3001
|
||||||
|
|
||||||
|
# ── Mobile (Expo) ──
|
||||||
|
EXPO_PUBLIC_API_URL=http://localhost:3001
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/node
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=node
|
||||||
|
|
||||||
|
### Node ###
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# Snowpack dependency directory (https://snowpack.dev/)
|
||||||
|
web_modules/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional stylelint cache
|
||||||
|
.stylelintcache
|
||||||
|
|
||||||
|
# Microbundle cache
|
||||||
|
.rpt2_cache/
|
||||||
|
.rts2_cache_cjs/
|
||||||
|
.rts2_cache_es/
|
||||||
|
.rts2_cache_umd/
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
.turbo
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variable files
|
||||||
|
.env
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
.env.local
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
.parcel-cache
|
||||||
|
|
||||||
|
# Next.js build output
|
||||||
|
.next
|
||||||
|
out
|
||||||
|
|
||||||
|
# Nuxt.js build / generate output
|
||||||
|
.nuxt
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Gatsby files
|
||||||
|
.cache/
|
||||||
|
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||||
|
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||||
|
# public
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# vuepress v2.x temp and cache directory
|
||||||
|
.temp
|
||||||
|
|
||||||
|
# Docusaurus cache and generated files
|
||||||
|
.docusaurus
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# TernJS port file
|
||||||
|
.tern-port
|
||||||
|
|
||||||
|
# Stores VSCode versions used for testing VSCode extensions
|
||||||
|
.vscode-test
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
|
.yarn/build-state.yml
|
||||||
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
|
|
||||||
|
### Node Patch ###
|
||||||
|
# Serverless Webpack directories
|
||||||
|
.webpack/
|
||||||
|
|
||||||
|
# Optional stylelint cache
|
||||||
|
|
||||||
|
# SvelteKit build / generate output
|
||||||
|
.svelte-kit
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/node
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# compiled output
|
||||||
|
/dist
|
||||||
|
/node_modules
|
||||||
|
/build
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Tests
|
||||||
|
/coverage
|
||||||
|
/.nyc_output
|
||||||
|
|
||||||
|
# IDEs and editors
|
||||||
|
/.idea
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
.c9/
|
||||||
|
*.launch
|
||||||
|
.settings/
|
||||||
|
*.sublime-workspace
|
||||||
|
|
||||||
|
# IDE - VSCode
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
|
||||||
|
# dotenv environment variable files
|
||||||
|
.env
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
.env.local
|
||||||
|
|
||||||
|
# temp directory
|
||||||
|
.temp
|
||||||
|
.tmp
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
<p align="center">
|
||||||
|
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
|
||||||
|
[circleci-url]: https://circleci.com/gh/nestjs/nest
|
||||||
|
|
||||||
|
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
|
||||||
|
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
|
||||||
|
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
|
||||||
|
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
|
||||||
|
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
||||||
|
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
||||||
|
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
|
||||||
|
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
|
||||||
|
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
|
||||||
|
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
|
||||||
|
</p>
|
||||||
|
<!--[](https://opencollective.com/nest#backer)
|
||||||
|
[](https://opencollective.com/nest#sponsor)-->
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
|
||||||
|
|
||||||
|
## Project setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ pnpm install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Compile and run the project
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# development
|
||||||
|
$ pnpm run start
|
||||||
|
|
||||||
|
# watch mode
|
||||||
|
$ pnpm run start:dev
|
||||||
|
|
||||||
|
# production mode
|
||||||
|
$ pnpm run start:prod
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run tests
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# unit tests
|
||||||
|
$ pnpm run test
|
||||||
|
|
||||||
|
# e2e tests
|
||||||
|
$ pnpm run test:e2e
|
||||||
|
|
||||||
|
# test coverage
|
||||||
|
$ pnpm run test:cov
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.
|
||||||
|
|
||||||
|
If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ pnpm install -g @nestjs/mau
|
||||||
|
$ mau deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
Check out a few resources that may come in handy when working with NestJS:
|
||||||
|
|
||||||
|
- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
|
||||||
|
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
|
||||||
|
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
|
||||||
|
- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
|
||||||
|
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
|
||||||
|
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
|
||||||
|
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
|
||||||
|
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
|
||||||
|
|
||||||
|
## Stay in touch
|
||||||
|
|
||||||
|
- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
|
||||||
|
- Website - [https://nestjs.com](https://nestjs.com/)
|
||||||
|
- Twitter - [@nestframework](https://twitter.com/nestframework)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
|
||||||
|
"extends": ["../../biome.json"],
|
||||||
|
"root": false,
|
||||||
|
"files": {
|
||||||
|
"includes": ["**", "!dist", "!coverage"]
|
||||||
|
},
|
||||||
|
"linter": {
|
||||||
|
"rules": {
|
||||||
|
"complexity": {
|
||||||
|
"noStaticOnlyClass": "off"
|
||||||
|
},
|
||||||
|
"style": {
|
||||||
|
"noParameterProperties": "off",
|
||||||
|
"useImportType": "off"
|
||||||
|
},
|
||||||
|
"correctness": {
|
||||||
|
"noUnusedVariables": "warn"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/nest-cli",
|
||||||
|
"collection": "@nestjs/schematics",
|
||||||
|
"sourceRoot": "src",
|
||||||
|
"compilerOptions": {
|
||||||
|
"deleteOutDir": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"name": "api",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "",
|
||||||
|
"author": "",
|
||||||
|
"private": true,
|
||||||
|
"license": "UNLICENSED",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "nest start --watch",
|
||||||
|
"build": "nest build",
|
||||||
|
"format": "biome format --write src/ test/",
|
||||||
|
"start": "nest start",
|
||||||
|
"start:debug": "nest start --debug --watch",
|
||||||
|
"start:prod": "node dist/main",
|
||||||
|
"lint": "biome check src/ test/",
|
||||||
|
"check-types": "tsc --noEmit",
|
||||||
|
"clean": "rm -rf dist",
|
||||||
|
"test": "jest",
|
||||||
|
"test:watch": "jest --watch",
|
||||||
|
"test:cov": "jest --coverage",
|
||||||
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
||||||
|
"test:e2e": "jest --config ./test/jest-e2e.json"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@nestjs/common": "^11.0.1",
|
||||||
|
"@nestjs/core": "^11.0.1",
|
||||||
|
"@nestjs/platform-express": "^11.0.1",
|
||||||
|
"reflect-metadata": "^0.2.2",
|
||||||
|
"rxjs": "^7.8.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@nestjs/cli": "^11.0.0",
|
||||||
|
"@nestjs/schematics": "^11.0.0",
|
||||||
|
"@nestjs/testing": "^11.0.1",
|
||||||
|
"@types/express": "^5.0.0",
|
||||||
|
"@types/jest": "^30.0.0",
|
||||||
|
"@types/node": "^22.10.7",
|
||||||
|
"@types/supertest": "^6.0.2",
|
||||||
|
"jest": "^30.0.0",
|
||||||
|
"source-map-support": "^0.5.21",
|
||||||
|
"supertest": "^7.0.0",
|
||||||
|
"ts-jest": "^29.2.5",
|
||||||
|
"ts-loader": "^9.5.2",
|
||||||
|
"ts-node": "^10.9.2",
|
||||||
|
"tsconfig-paths": "^4.2.0",
|
||||||
|
"typescript": "^5.7.3"
|
||||||
|
},
|
||||||
|
"jest": {
|
||||||
|
"moduleFileExtensions": [
|
||||||
|
"js",
|
||||||
|
"json",
|
||||||
|
"ts"
|
||||||
|
],
|
||||||
|
"rootDir": "src",
|
||||||
|
"testRegex": ".*\\.spec\\.ts$",
|
||||||
|
"transform": {
|
||||||
|
"^.+\\.(t|j)s$": "ts-jest"
|
||||||
|
},
|
||||||
|
"collectCoverageFrom": [
|
||||||
|
"**/*.(t|j)s"
|
||||||
|
],
|
||||||
|
"coverageDirectory": "../coverage",
|
||||||
|
"testEnvironment": "node"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
import { Test, type TestingModule } from '@nestjs/testing'
|
||||||
|
import { AppController } from './app.controller'
|
||||||
|
import { AppService } from './app.service'
|
||||||
|
|
||||||
|
describe('AppController', () => {
|
||||||
|
let appController: AppController
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
const app: TestingModule = await Test.createTestingModule({
|
||||||
|
controllers: [AppController],
|
||||||
|
providers: [AppService],
|
||||||
|
}).compile()
|
||||||
|
|
||||||
|
appController = app.get<AppController>(AppController)
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('root', () => {
|
||||||
|
it('should return "Hello World!"', () => {
|
||||||
|
expect(appController.getHello()).toBe('Hello World!')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { Controller, Get } from '@nestjs/common'
|
||||||
|
import { AppService } from './app.service'
|
||||||
|
|
||||||
|
@Controller()
|
||||||
|
export class AppController {
|
||||||
|
constructor(private readonly appService: AppService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
getHello(): string {
|
||||||
|
return this.appService.getHello()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { AppController } from './app.controller'
|
||||||
|
import { AppService } from './app.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [],
|
||||||
|
controllers: [AppController],
|
||||||
|
providers: [AppService],
|
||||||
|
})
|
||||||
|
export class AppModule {}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class AppService {
|
||||||
|
getHello(): string {
|
||||||
|
return 'Hello World!'
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import { NestFactory } from '@nestjs/core'
|
||||||
|
import { AppModule } from './app.module'
|
||||||
|
|
||||||
|
async function bootstrap() {
|
||||||
|
const app = await NestFactory.create(AppModule)
|
||||||
|
await app.listen(process.env.API_PORT ?? 3001)
|
||||||
|
}
|
||||||
|
bootstrap()
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import type { INestApplication } from '@nestjs/common'
|
||||||
|
import { Test, type TestingModule } from '@nestjs/testing'
|
||||||
|
import request from 'supertest'
|
||||||
|
import type { App } from 'supertest/types'
|
||||||
|
import { AppModule } from './../src/app.module'
|
||||||
|
|
||||||
|
describe('AppController (e2e)', () => {
|
||||||
|
let app: INestApplication<App>
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
const moduleFixture: TestingModule = await Test.createTestingModule({
|
||||||
|
imports: [AppModule],
|
||||||
|
}).compile()
|
||||||
|
|
||||||
|
app = moduleFixture.createNestApplication()
|
||||||
|
await app.init()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('/ (GET)', () => {
|
||||||
|
return request(app.getHttpServer())
|
||||||
|
.get('/')
|
||||||
|
.expect(200)
|
||||||
|
.expect('Hello World!')
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"moduleFileExtensions": ["js", "json", "ts"],
|
||||||
|
"rootDir": ".",
|
||||||
|
"testEnvironment": "node",
|
||||||
|
"testRegex": ".e2e-spec.ts$",
|
||||||
|
"transform": {
|
||||||
|
"^.+\\.(t|j)s$": "ts-jest"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2023",
|
||||||
|
"module": "nodenext",
|
||||||
|
"moduleResolution": "nodenext",
|
||||||
|
"resolvePackageJsonExports": true,
|
||||||
|
"declaration": true,
|
||||||
|
"removeComments": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"outDir": "./dist",
|
||||||
|
"baseUrl": "./"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
First, run the development server:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run dev
|
||||||
|
# or
|
||||||
|
yarn dev
|
||||||
|
# or
|
||||||
|
pnpm dev
|
||||||
|
# or
|
||||||
|
bun dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||||
|
|
||||||
|
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||||
|
|
||||||
|
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
||||||
|
|
||||||
|
## Learn More
|
||||||
|
|
||||||
|
To learn more about Next.js, take a look at the following resources:
|
||||||
|
|
||||||
|
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||||
|
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||||
|
|
||||||
|
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
||||||
|
|
||||||
|
## Deploy on Vercel
|
||||||
|
|
||||||
|
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||||
|
|
||||||
|
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
|
||||||
|
"extends": ["../../biome.json"],
|
||||||
|
"root": false,
|
||||||
|
"files": {
|
||||||
|
"includes": ["**", "!.next", "!dist", "!build"]
|
||||||
|
},
|
||||||
|
"css": {
|
||||||
|
"parser": {
|
||||||
|
"cssModules": true,
|
||||||
|
"tailwindDirectives": true
|
||||||
|
},
|
||||||
|
"linter": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"linter": {
|
||||||
|
"rules": {
|
||||||
|
"suspicious": {
|
||||||
|
"noUnknownAtRules": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"domains": {
|
||||||
|
"next": "recommended",
|
||||||
|
"react": "recommended"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"javascript": {
|
||||||
|
"formatter": {
|
||||||
|
"jsxQuoteStyle": "double"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import type { NextConfig } from 'next'
|
||||||
|
|
||||||
|
const nextConfig: NextConfig = {
|
||||||
|
/* config options here */
|
||||||
|
reactCompiler: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
export default nextConfig
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "frontend",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dev": "next dev",
|
||||||
|
"build": "next build",
|
||||||
|
"start": "next start",
|
||||||
|
"lint": "biome check",
|
||||||
|
"format": "biome format --write",
|
||||||
|
"check-types": "tsc --noEmit",
|
||||||
|
"clean": "rm -rf .next"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"next": "16.1.6",
|
||||||
|
"react": "19.2.3",
|
||||||
|
"react-dom": "19.2.3"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@tailwindcss/postcss": "^4",
|
||||||
|
"@types/node": "^20",
|
||||||
|
"@types/react": "^19",
|
||||||
|
"@types/react-dom": "^19",
|
||||||
|
"babel-plugin-react-compiler": "1.0.0",
|
||||||
|
"tailwindcss": "^4",
|
||||||
|
"typescript": "^5"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
const config = {
|
||||||
|
plugins: {
|
||||||
|
'@tailwindcss/postcss': {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
|
||||||
|
After Width: | Height: | Size: 391 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
|
||||||
|
After Width: | Height: | Size: 128 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
|
||||||
|
After Width: | Height: | Size: 385 B |
|
After Width: | Height: | Size: 25 KiB |
@@ -0,0 +1,26 @@
|
|||||||
|
@import "tailwindcss";
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--background: #ffffff;
|
||||||
|
--foreground: #171717;
|
||||||
|
}
|
||||||
|
|
||||||
|
@theme inline {
|
||||||
|
--color-background: var(--background);
|
||||||
|
--color-foreground: var(--foreground);
|
||||||
|
--font-sans: var(--font-geist-sans);
|
||||||
|
--font-mono: var(--font-geist-mono);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--background: #0a0a0a;
|
||||||
|
--foreground: #ededed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: var(--background);
|
||||||
|
color: var(--foreground);
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import type { Metadata } from 'next'
|
||||||
|
import { Geist, Geist_Mono } from 'next/font/google'
|
||||||
|
import './globals.css'
|
||||||
|
|
||||||
|
const geistSans = Geist({
|
||||||
|
variable: '--font-geist-sans',
|
||||||
|
subsets: ['latin'],
|
||||||
|
})
|
||||||
|
|
||||||
|
const geistMono = Geist_Mono({
|
||||||
|
variable: '--font-geist-mono',
|
||||||
|
subsets: ['latin'],
|
||||||
|
})
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Create Next App',
|
||||||
|
description: 'Generated by create next app',
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function RootLayout({
|
||||||
|
children,
|
||||||
|
}: Readonly<{
|
||||||
|
children: React.ReactNode
|
||||||
|
}>) {
|
||||||
|
return (
|
||||||
|
<html lang="en">
|
||||||
|
<body
|
||||||
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
import Image from 'next/image'
|
||||||
|
|
||||||
|
export default function Home() {
|
||||||
|
return (
|
||||||
|
<div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
|
||||||
|
<main className="flex min-h-screen w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start">
|
||||||
|
<Image
|
||||||
|
className="dark:invert"
|
||||||
|
src="/next.svg"
|
||||||
|
alt="Next.js logo"
|
||||||
|
width={100}
|
||||||
|
height={20}
|
||||||
|
priority
|
||||||
|
/>
|
||||||
|
<div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left">
|
||||||
|
<h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50">
|
||||||
|
To get started, edit the page.tsx file.
|
||||||
|
</h1>
|
||||||
|
<p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400">
|
||||||
|
Looking for a starting point or more instructions? Head over to{' '}
|
||||||
|
<a
|
||||||
|
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||||
|
className="font-medium text-zinc-950 dark:text-zinc-50"
|
||||||
|
>
|
||||||
|
Templates
|
||||||
|
</a>{' '}
|
||||||
|
or the{' '}
|
||||||
|
<a
|
||||||
|
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||||
|
className="font-medium text-zinc-950 dark:text-zinc-50"
|
||||||
|
>
|
||||||
|
Learning
|
||||||
|
</a>{' '}
|
||||||
|
center.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col gap-4 text-base font-medium sm:flex-row">
|
||||||
|
<a
|
||||||
|
className="flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]"
|
||||||
|
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
className="dark:invert"
|
||||||
|
src="/vercel.svg"
|
||||||
|
alt="Vercel logomark"
|
||||||
|
width={16}
|
||||||
|
height={16}
|
||||||
|
/>
|
||||||
|
Deploy Now
|
||||||
|
</a>
|
||||||
|
<a
|
||||||
|
className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]"
|
||||||
|
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
Documentation
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2017",
|
||||||
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
|
"allowJs": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"module": "esnext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "next"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"next-env.d.ts",
|
||||||
|
"**/*.ts",
|
||||||
|
"**/*.tsx",
|
||||||
|
".next/types/**/*.ts",
|
||||||
|
".next/dev/types/**/*.ts",
|
||||||
|
"**/*.mts"
|
||||||
|
],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Expo
|
||||||
|
.expo/
|
||||||
|
dist/
|
||||||
|
web-build/
|
||||||
|
expo-env.d.ts
|
||||||
|
|
||||||
|
# Native
|
||||||
|
.kotlin/
|
||||||
|
*.orig.*
|
||||||
|
*.jks
|
||||||
|
*.p8
|
||||||
|
*.p12
|
||||||
|
*.key
|
||||||
|
*.mobileprovision
|
||||||
|
|
||||||
|
# Metro
|
||||||
|
.metro-health-check*
|
||||||
|
|
||||||
|
# debug
|
||||||
|
npm-debug.*
|
||||||
|
yarn-debug.*
|
||||||
|
yarn-error.*
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
.DS_Store
|
||||||
|
*.pem
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env*.local
|
||||||
|
|
||||||
|
# typescript
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
app-example
|
||||||
|
|
||||||
|
# generated native folders
|
||||||
|
/ios
|
||||||
|
/android
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{ "recommendations": ["expo.vscode-expo-tools"] }
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll": "explicit",
|
||||||
|
"source.organizeImports": "explicit",
|
||||||
|
"source.sortMembers": "explicit"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# Welcome to your Expo app 👋
|
||||||
|
|
||||||
|
This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
|
||||||
|
|
||||||
|
## Get started
|
||||||
|
|
||||||
|
1. Install dependencies
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Start the app
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx expo start
|
||||||
|
```
|
||||||
|
|
||||||
|
In the output, you'll find options to open the app in a
|
||||||
|
|
||||||
|
- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
|
||||||
|
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
|
||||||
|
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
|
||||||
|
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
|
||||||
|
|
||||||
|
You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
|
||||||
|
|
||||||
|
## Get a fresh project
|
||||||
|
|
||||||
|
When you're ready, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run reset-project
|
||||||
|
```
|
||||||
|
|
||||||
|
This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
|
||||||
|
|
||||||
|
### Other setup steps
|
||||||
|
|
||||||
|
- To set up ESLint for linting, run `npx expo lint`, or follow our guide on ["Using ESLint and Prettier"](https://docs.expo.dev/guides/using-eslint/)
|
||||||
|
- If you'd like to set up unit testing, follow our guide on ["Unit Testing with Jest"](https://docs.expo.dev/develop/unit-testing/)
|
||||||
|
- Learn more about the TypeScript setup in this template in our guide on ["Using TypeScript"](https://docs.expo.dev/guides/typescript/)
|
||||||
|
|
||||||
|
## Learn more
|
||||||
|
|
||||||
|
To learn more about developing your project with Expo, look at the following resources:
|
||||||
|
|
||||||
|
- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
|
||||||
|
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
|
||||||
|
|
||||||
|
## Join the community
|
||||||
|
|
||||||
|
Join our community of developers creating universal apps.
|
||||||
|
|
||||||
|
- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
|
||||||
|
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"expo": {
|
||||||
|
"name": "mobile",
|
||||||
|
"slug": "mobile",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"orientation": "portrait",
|
||||||
|
"icon": "./assets/images/icon.png",
|
||||||
|
"scheme": "mobile",
|
||||||
|
"userInterfaceStyle": "automatic",
|
||||||
|
"ios": {
|
||||||
|
"icon": "./assets/expo.icon"
|
||||||
|
},
|
||||||
|
"android": {
|
||||||
|
"adaptiveIcon": {
|
||||||
|
"backgroundColor": "#E6F4FE",
|
||||||
|
"foregroundImage": "./assets/images/android-icon-foreground.png",
|
||||||
|
"backgroundImage": "./assets/images/android-icon-background.png",
|
||||||
|
"monochromeImage": "./assets/images/android-icon-monochrome.png"
|
||||||
|
},
|
||||||
|
"predictiveBackGestureEnabled": false
|
||||||
|
},
|
||||||
|
"web": {
|
||||||
|
"output": "static",
|
||||||
|
"favicon": "./assets/images/favicon.png"
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"expo-router",
|
||||||
|
[
|
||||||
|
"expo-splash-screen",
|
||||||
|
{
|
||||||
|
"backgroundColor": "#208AEF",
|
||||||
|
"android": {
|
||||||
|
"image": "./assets/images/splash-icon.png",
|
||||||
|
"imageWidth": 76
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"experiments": {
|
||||||
|
"typedRoutes": true,
|
||||||
|
"reactCompiler": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="652" height="606" viewBox="0 0 652 606" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M353.554 0H298.446C273.006 0 249.684 14.6347 237.962 37.9539L4.37994 502.646C-1.04325 513.435 -1.45067 526.178 3.2716 537.313L22.6123 582.918C34.6475 611.297 72.5404 614.156 88.4414 587.885L309.863 222.063C313.34 216.317 319.439 212.826 326 212.826C332.561 212.826 338.659 216.317 342.137 222.063L563.559 587.885C579.46 614.156 617.352 611.297 629.388 582.918L648.728 537.313C653.451 526.178 653.043 513.435 647.62 502.646L414.038 37.9539C402.316 14.6347 378.994 0 353.554 0Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 608 B |
|
After Width: | Height: | Size: 52 KiB |
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"fill": {
|
||||||
|
"automatic-gradient": "extended-srgb:0.00000,0.47843,1.00000,1.00000"
|
||||||
|
},
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"image-name": "expo-symbol 2.svg",
|
||||||
|
"name": "expo-symbol 2",
|
||||||
|
"position": {
|
||||||
|
"scale": 1,
|
||||||
|
"translation-in-points": [1.1008400065293245e-5, -16.046875]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"image-name": "grid.png",
|
||||||
|
"name": "grid"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"shadow": {
|
||||||
|
"kind": "neutral",
|
||||||
|
"opacity": 0.5
|
||||||
|
},
|
||||||
|
"translucency": {
|
||||||
|
"enabled": true,
|
||||||
|
"value": 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supported-platforms": {
|
||||||
|
"circles": ["watchOS"],
|
||||||
|
"squares": "shared"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 780 KiB |
|
After Width: | Height: | Size: 324 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 215 B |
|
After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 468 B |
|
After Width: | Height: | Size: 253 B |
|
After Width: | Height: | Size: 343 B |
|
After Width: | Height: | Size: 479 B |
|
After Width: | Height: | Size: 58 KiB |
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
|
||||||
|
"extends": ["../../biome.json"],
|
||||||
|
"root": false,
|
||||||
|
"files": {
|
||||||
|
"includes": ["**", "!.expo", "!dist", "!android", "!ios"]
|
||||||
|
},
|
||||||
|
"linter": {
|
||||||
|
"rules": {
|
||||||
|
"style": {
|
||||||
|
"noCommonJs": "off"
|
||||||
|
},
|
||||||
|
"suspicious": {
|
||||||
|
"noUnknownAtRules": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"domains": {
|
||||||
|
"react": "recommended"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"name": "mobile",
|
||||||
|
"main": "expo-router/entry",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "expo start",
|
||||||
|
"start": "expo start",
|
||||||
|
"reset-project": "node ./scripts/reset-project.js",
|
||||||
|
"android": "expo start --android",
|
||||||
|
"ios": "expo start --ios",
|
||||||
|
"web": "expo start --web",
|
||||||
|
"lint": "biome check",
|
||||||
|
"format": "biome format --write",
|
||||||
|
"check-types": "tsc --noEmit",
|
||||||
|
"build": "expo export"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@react-navigation/bottom-tabs": "^7.7.3",
|
||||||
|
"@react-navigation/elements": "^2.8.1",
|
||||||
|
"@react-navigation/native": "^7.1.28",
|
||||||
|
"expo": "~55.0.5",
|
||||||
|
"expo-constants": "~55.0.7",
|
||||||
|
"expo-device": "~55.0.9",
|
||||||
|
"expo-font": "~55.0.4",
|
||||||
|
"expo-glass-effect": "~55.0.7",
|
||||||
|
"expo-image": "~55.0.6",
|
||||||
|
"expo-linking": "~55.0.7",
|
||||||
|
"expo-router": "~55.0.4",
|
||||||
|
"expo-splash-screen": "~55.0.10",
|
||||||
|
"expo-status-bar": "~55.0.4",
|
||||||
|
"expo-symbols": "~55.0.5",
|
||||||
|
"expo-system-ui": "~55.0.9",
|
||||||
|
"expo-web-browser": "~55.0.9",
|
||||||
|
"react": "19.2.0",
|
||||||
|
"react-dom": "19.2.0",
|
||||||
|
"react-native": "0.83.2",
|
||||||
|
"react-native-gesture-handler": "~2.30.0",
|
||||||
|
"react-native-worklets": "0.7.2",
|
||||||
|
"react-native-reanimated": "4.2.1",
|
||||||
|
"react-native-safe-area-context": "~5.6.2",
|
||||||
|
"react-native-screens": "~4.23.0",
|
||||||
|
"react-native-web": "~0.21.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/react": "~19.2.2",
|
||||||
|
"typescript": "~5.9.2"
|
||||||
|
},
|
||||||
|
"private": true
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This script is used to reset the project to a blank state.
|
||||||
|
* It deletes or moves the /src and /scripts directories to /example based on user input and creates a new /src/app directory with an index.tsx and _layout.tsx file.
|
||||||
|
* You can remove the `reset-project` script from package.json and safely delete this file after running it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const fs = require('node:fs')
|
||||||
|
const path = require('node:path')
|
||||||
|
const readline = require('node:readline')
|
||||||
|
|
||||||
|
const root = process.cwd()
|
||||||
|
const oldDirs = ['src', 'scripts']
|
||||||
|
const exampleDir = 'example'
|
||||||
|
const newAppDir = 'src/app'
|
||||||
|
const exampleDirPath = path.join(root, exampleDir)
|
||||||
|
|
||||||
|
const indexContent = `import { Text, View, StyleSheet } from "react-native";
|
||||||
|
|
||||||
|
export default function Index() {
|
||||||
|
return (
|
||||||
|
<View style={styles.container}>
|
||||||
|
<Text>Edit src/app/index.tsx to edit this screen.</Text>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
`
|
||||||
|
|
||||||
|
const layoutContent = `import { Stack } from "expo-router";
|
||||||
|
|
||||||
|
export default function RootLayout() {
|
||||||
|
return <Stack />;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
|
const rl = readline.createInterface({
|
||||||
|
input: process.stdin,
|
||||||
|
output: process.stdout,
|
||||||
|
})
|
||||||
|
|
||||||
|
const moveDirectories = async (userInput) => {
|
||||||
|
try {
|
||||||
|
if (userInput === 'y') {
|
||||||
|
// Create the app-example directory
|
||||||
|
await fs.promises.mkdir(exampleDirPath, { recursive: true })
|
||||||
|
console.log(`📁 /${exampleDir} directory created.`)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move old directories to new app-example directory or delete them
|
||||||
|
for (const dir of oldDirs) {
|
||||||
|
const oldDirPath = path.join(root, dir)
|
||||||
|
if (fs.existsSync(oldDirPath)) {
|
||||||
|
if (userInput === 'y') {
|
||||||
|
const newDirPath = path.join(root, exampleDir, dir)
|
||||||
|
await fs.promises.rename(oldDirPath, newDirPath)
|
||||||
|
console.log(`➡️ /${dir} moved to /${exampleDir}/${dir}.`)
|
||||||
|
} else {
|
||||||
|
await fs.promises.rm(oldDirPath, { recursive: true, force: true })
|
||||||
|
console.log(`❌ /${dir} deleted.`)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log(`➡️ /${dir} does not exist, skipping.`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create new /src/app directory
|
||||||
|
const newAppDirPath = path.join(root, newAppDir)
|
||||||
|
await fs.promises.mkdir(newAppDirPath, { recursive: true })
|
||||||
|
console.log('\n📁 New /src/app directory created.')
|
||||||
|
|
||||||
|
// Create index.tsx
|
||||||
|
const indexPath = path.join(newAppDirPath, 'index.tsx')
|
||||||
|
await fs.promises.writeFile(indexPath, indexContent)
|
||||||
|
console.log('📄 src/app/index.tsx created.')
|
||||||
|
|
||||||
|
// Create _layout.tsx
|
||||||
|
const layoutPath = path.join(newAppDirPath, '_layout.tsx')
|
||||||
|
await fs.promises.writeFile(layoutPath, layoutContent)
|
||||||
|
console.log('📄 src/app/_layout.tsx created.')
|
||||||
|
|
||||||
|
console.log('\n✅ Project reset complete. Next steps:')
|
||||||
|
console.log(
|
||||||
|
`1. Run \`npx expo start\` to start a development server.\n2. Edit src/app/index.tsx to edit the main screen.\n3. Put all your application code in /src, only screens and layout files should be in /src/app.${
|
||||||
|
userInput === 'y'
|
||||||
|
? `\n4. Delete the /${exampleDir} directory when you're done referencing it.`
|
||||||
|
: ''
|
||||||
|
}`,
|
||||||
|
)
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`❌ Error during script execution: ${error.message}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rl.question(
|
||||||
|
'Do you want to move existing files to /example instead of deleting them? (Y/n): ',
|
||||||
|
(answer) => {
|
||||||
|
const userInput = answer.trim().toLowerCase() || 'y'
|
||||||
|
if (userInput === 'y' || userInput === 'n') {
|
||||||
|
moveDirectories(userInput).finally(() => rl.close())
|
||||||
|
} else {
|
||||||
|
console.log("❌ Invalid input. Please enter 'Y' or 'N'.")
|
||||||
|
rl.close()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import {
|
||||||
|
DarkTheme,
|
||||||
|
DefaultTheme,
|
||||||
|
ThemeProvider,
|
||||||
|
} from '@react-navigation/native'
|
||||||
|
import { useColorScheme } from 'react-native'
|
||||||
|
|
||||||
|
import { AnimatedSplashOverlay } from '@/components/animated-icon'
|
||||||
|
import AppTabs from '@/components/app-tabs'
|
||||||
|
|
||||||
|
export default function TabLayout() {
|
||||||
|
const colorScheme = useColorScheme()
|
||||||
|
return (
|
||||||
|
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
|
||||||
|
<AnimatedSplashOverlay />
|
||||||
|
<AppTabs />
|
||||||
|
</ThemeProvider>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,199 @@
|
|||||||
|
import { Image } from 'expo-image'
|
||||||
|
import { SymbolView } from 'expo-symbols'
|
||||||
|
import { Platform, Pressable, ScrollView, StyleSheet } from 'react-native'
|
||||||
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||||
|
|
||||||
|
import { ExternalLink } from '@/components/external-link'
|
||||||
|
import { ThemedText } from '@/components/themed-text'
|
||||||
|
import { ThemedView } from '@/components/themed-view'
|
||||||
|
import { Collapsible } from '@/components/ui/collapsible'
|
||||||
|
import { WebBadge } from '@/components/web-badge'
|
||||||
|
import { BottomTabInset, MaxContentWidth, Spacing } from '@/constants/theme'
|
||||||
|
import { useTheme } from '@/hooks/use-theme'
|
||||||
|
|
||||||
|
export default function TabTwoScreen() {
|
||||||
|
const safeAreaInsets = useSafeAreaInsets()
|
||||||
|
const insets = {
|
||||||
|
...safeAreaInsets,
|
||||||
|
bottom: safeAreaInsets.bottom + BottomTabInset + Spacing.three,
|
||||||
|
}
|
||||||
|
const theme = useTheme()
|
||||||
|
|
||||||
|
const contentPlatformStyle = Platform.select({
|
||||||
|
android: {
|
||||||
|
paddingTop: insets.top,
|
||||||
|
paddingLeft: insets.left,
|
||||||
|
paddingRight: insets.right,
|
||||||
|
paddingBottom: insets.bottom,
|
||||||
|
},
|
||||||
|
web: {
|
||||||
|
paddingTop: Spacing.six,
|
||||||
|
paddingBottom: Spacing.four,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ScrollView
|
||||||
|
style={[styles.scrollView, { backgroundColor: theme.background }]}
|
||||||
|
contentInset={insets}
|
||||||
|
contentContainerStyle={[styles.contentContainer, contentPlatformStyle]}
|
||||||
|
>
|
||||||
|
<ThemedView style={styles.container}>
|
||||||
|
<ThemedView style={styles.titleContainer}>
|
||||||
|
<ThemedText type="subtitle">Explore</ThemedText>
|
||||||
|
<ThemedText style={styles.centerText} themeColor="textSecondary">
|
||||||
|
This starter app includes example{'\n'}code to help you get started.
|
||||||
|
</ThemedText>
|
||||||
|
|
||||||
|
<ExternalLink href="https://docs.expo.dev" asChild>
|
||||||
|
<Pressable style={({ pressed }) => pressed && styles.pressed}>
|
||||||
|
<ThemedView type="backgroundElement" style={styles.linkButton}>
|
||||||
|
<ThemedText type="link">Expo documentation</ThemedText>
|
||||||
|
<SymbolView
|
||||||
|
tintColor={theme.text}
|
||||||
|
name={{
|
||||||
|
ios: 'arrow.up.right.square',
|
||||||
|
android: 'link',
|
||||||
|
web: 'link',
|
||||||
|
}}
|
||||||
|
size={12}
|
||||||
|
/>
|
||||||
|
</ThemedView>
|
||||||
|
</Pressable>
|
||||||
|
</ExternalLink>
|
||||||
|
</ThemedView>
|
||||||
|
|
||||||
|
<ThemedView style={styles.sectionsWrapper}>
|
||||||
|
<Collapsible title="File-based routing">
|
||||||
|
<ThemedText type="small">
|
||||||
|
This app has two screens:{' '}
|
||||||
|
<ThemedText type="code">src/app/index.tsx</ThemedText> and{' '}
|
||||||
|
<ThemedText type="code">src/app/explore.tsx</ThemedText>
|
||||||
|
</ThemedText>
|
||||||
|
<ThemedText type="small">
|
||||||
|
The layout file in{' '}
|
||||||
|
<ThemedText type="code">src/app/_layout.tsx</ThemedText> sets up
|
||||||
|
the tab navigator.
|
||||||
|
</ThemedText>
|
||||||
|
<ExternalLink href="https://docs.expo.dev/router/introduction">
|
||||||
|
<ThemedText type="linkPrimary">Learn more</ThemedText>
|
||||||
|
</ExternalLink>
|
||||||
|
</Collapsible>
|
||||||
|
|
||||||
|
<Collapsible title="Android, iOS, and web support">
|
||||||
|
<ThemedView
|
||||||
|
type="backgroundElement"
|
||||||
|
style={styles.collapsibleContent}
|
||||||
|
>
|
||||||
|
<ThemedText type="small">
|
||||||
|
You can open this project on Android, iOS, and the web. To open
|
||||||
|
the web version, press{' '}
|
||||||
|
<ThemedText type="smallBold">w</ThemedText> in the terminal
|
||||||
|
running this project.
|
||||||
|
</ThemedText>
|
||||||
|
<Image
|
||||||
|
source={require('@/assets/images/tutorial-web.png')}
|
||||||
|
style={styles.imageTutorial}
|
||||||
|
/>
|
||||||
|
</ThemedView>
|
||||||
|
</Collapsible>
|
||||||
|
|
||||||
|
<Collapsible title="Images">
|
||||||
|
<ThemedText type="small">
|
||||||
|
For static images, you can use the{' '}
|
||||||
|
<ThemedText type="code">@2x</ThemedText> and{' '}
|
||||||
|
<ThemedText type="code">@3x</ThemedText> suffixes to provide files
|
||||||
|
for different screen densities.
|
||||||
|
</ThemedText>
|
||||||
|
<Image
|
||||||
|
source={require('@/assets/images/react-logo.png')}
|
||||||
|
style={styles.imageReact}
|
||||||
|
/>
|
||||||
|
<ExternalLink href="https://reactnative.dev/docs/images">
|
||||||
|
<ThemedText type="linkPrimary">Learn more</ThemedText>
|
||||||
|
</ExternalLink>
|
||||||
|
</Collapsible>
|
||||||
|
|
||||||
|
<Collapsible title="Light and dark mode components">
|
||||||
|
<ThemedText type="small">
|
||||||
|
This template has light and dark mode support. The{' '}
|
||||||
|
<ThemedText type="code">useColorScheme()</ThemedText> hook lets
|
||||||
|
you inspect what the user's current color scheme is, and so
|
||||||
|
you can adjust UI colors accordingly.
|
||||||
|
</ThemedText>
|
||||||
|
<ExternalLink href="https://docs.expo.dev/develop/user-interface/color-themes/">
|
||||||
|
<ThemedText type="linkPrimary">Learn more</ThemedText>
|
||||||
|
</ExternalLink>
|
||||||
|
</Collapsible>
|
||||||
|
|
||||||
|
<Collapsible title="Animations">
|
||||||
|
<ThemedText type="small">
|
||||||
|
This template includes an example of an animated component. The{' '}
|
||||||
|
<ThemedText type="code">
|
||||||
|
src/components/ui/collapsible.tsx
|
||||||
|
</ThemedText>{' '}
|
||||||
|
component uses the powerful{' '}
|
||||||
|
<ThemedText type="code">react-native-reanimated</ThemedText>{' '}
|
||||||
|
library to animate opening this hint.
|
||||||
|
</ThemedText>
|
||||||
|
</Collapsible>
|
||||||
|
</ThemedView>
|
||||||
|
{Platform.OS === 'web' && <WebBadge />}
|
||||||
|
</ThemedView>
|
||||||
|
</ScrollView>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
scrollView: {
|
||||||
|
flex: 1,
|
||||||
|
},
|
||||||
|
contentContainer: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
container: {
|
||||||
|
maxWidth: MaxContentWidth,
|
||||||
|
flexGrow: 1,
|
||||||
|
},
|
||||||
|
titleContainer: {
|
||||||
|
gap: Spacing.three,
|
||||||
|
alignItems: 'center',
|
||||||
|
paddingHorizontal: Spacing.four,
|
||||||
|
paddingVertical: Spacing.six,
|
||||||
|
},
|
||||||
|
centerText: {
|
||||||
|
textAlign: 'center',
|
||||||
|
},
|
||||||
|
pressed: {
|
||||||
|
opacity: 0.7,
|
||||||
|
},
|
||||||
|
linkButton: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
paddingHorizontal: Spacing.four,
|
||||||
|
paddingVertical: Spacing.two,
|
||||||
|
borderRadius: Spacing.five,
|
||||||
|
justifyContent: 'center',
|
||||||
|
gap: Spacing.one,
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
sectionsWrapper: {
|
||||||
|
gap: Spacing.five,
|
||||||
|
paddingHorizontal: Spacing.four,
|
||||||
|
paddingTop: Spacing.three,
|
||||||
|
},
|
||||||
|
collapsibleContent: {
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
imageTutorial: {
|
||||||
|
width: '100%',
|
||||||
|
aspectRatio: 296 / 171,
|
||||||
|
borderRadius: Spacing.three,
|
||||||
|
marginTop: Spacing.two,
|
||||||
|
},
|
||||||
|
imageReact: {
|
||||||
|
width: 100,
|
||||||
|
height: 100,
|
||||||
|
alignSelf: 'center',
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
import * as Device from 'expo-device'
|
||||||
|
import { Platform, StyleSheet } from 'react-native'
|
||||||
|
import { SafeAreaView } from 'react-native-safe-area-context'
|
||||||
|
|
||||||
|
import { AnimatedIcon } from '@/components/animated-icon'
|
||||||
|
import { HintRow } from '@/components/hint-row'
|
||||||
|
import { ThemedText } from '@/components/themed-text'
|
||||||
|
import { ThemedView } from '@/components/themed-view'
|
||||||
|
import { WebBadge } from '@/components/web-badge'
|
||||||
|
import { BottomTabInset, MaxContentWidth, Spacing } from '@/constants/theme'
|
||||||
|
|
||||||
|
function getDevMenuHint() {
|
||||||
|
if (Platform.OS === 'web') {
|
||||||
|
return <ThemedText type="small">use browser devtools</ThemedText>
|
||||||
|
}
|
||||||
|
if (Device.isDevice) {
|
||||||
|
return (
|
||||||
|
<ThemedText type="small">
|
||||||
|
shake device or press <ThemedText type="code">m</ThemedText> in terminal
|
||||||
|
</ThemedText>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
const shortcut = Platform.OS === 'android' ? 'cmd+m (or ctrl+m)' : 'cmd+d'
|
||||||
|
return (
|
||||||
|
<ThemedText type="small">
|
||||||
|
press <ThemedText type="code">{shortcut}</ThemedText>
|
||||||
|
</ThemedText>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function HomeScreen() {
|
||||||
|
return (
|
||||||
|
<ThemedView style={styles.container}>
|
||||||
|
<SafeAreaView style={styles.safeArea}>
|
||||||
|
<ThemedView style={styles.heroSection}>
|
||||||
|
<AnimatedIcon />
|
||||||
|
<ThemedText type="title" style={styles.title}>
|
||||||
|
Welcome to Expo
|
||||||
|
</ThemedText>
|
||||||
|
</ThemedView>
|
||||||
|
|
||||||
|
<ThemedText type="code" style={styles.code}>
|
||||||
|
get started
|
||||||
|
</ThemedText>
|
||||||
|
|
||||||
|
<ThemedView type="backgroundElement" style={styles.stepContainer}>
|
||||||
|
<HintRow
|
||||||
|
title="Try editing"
|
||||||
|
hint={<ThemedText type="code">src/app/index.tsx</ThemedText>}
|
||||||
|
/>
|
||||||
|
<HintRow title="Dev tools" hint={getDevMenuHint()} />
|
||||||
|
<HintRow
|
||||||
|
title="Fresh start"
|
||||||
|
hint={<ThemedText type="code">npm run reset-project</ThemedText>}
|
||||||
|
/>
|
||||||
|
</ThemedView>
|
||||||
|
|
||||||
|
{Platform.OS === 'web' && <WebBadge />}
|
||||||
|
</SafeAreaView>
|
||||||
|
</ThemedView>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
},
|
||||||
|
safeArea: {
|
||||||
|
flex: 1,
|
||||||
|
paddingHorizontal: Spacing.four,
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: Spacing.three,
|
||||||
|
paddingBottom: BottomTabInset + Spacing.three,
|
||||||
|
maxWidth: MaxContentWidth,
|
||||||
|
},
|
||||||
|
heroSection: {
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
flex: 1,
|
||||||
|
paddingHorizontal: Spacing.four,
|
||||||
|
gap: Spacing.four,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
textAlign: 'center',
|
||||||
|
},
|
||||||
|
code: {
|
||||||
|
textTransform: 'uppercase',
|
||||||
|
},
|
||||||
|
stepContainer: {
|
||||||
|
gap: Spacing.three,
|
||||||
|
alignSelf: 'stretch',
|
||||||
|
paddingHorizontal: Spacing.three,
|
||||||
|
paddingVertical: Spacing.four,
|
||||||
|
borderRadius: Spacing.four,
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
.expoLogoBackground {
|
||||||
|
background-image: linear-gradient(180deg, #3c9ffe, #0274df);
|
||||||
|
border-radius: 40px;
|
||||||
|
width: 128px;
|
||||||
|
height: 128px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
import { Image } from 'expo-image'
|
||||||
|
import { useState } from 'react'
|
||||||
|
import { Dimensions, StyleSheet, View } from 'react-native'
|
||||||
|
import Animated, { Easing, Keyframe } from 'react-native-reanimated'
|
||||||
|
import { scheduleOnRN } from 'react-native-worklets'
|
||||||
|
|
||||||
|
const INITIAL_SCALE_FACTOR = Dimensions.get('screen').height / 90
|
||||||
|
const DURATION = 600
|
||||||
|
|
||||||
|
export function AnimatedSplashOverlay() {
|
||||||
|
const [visible, setVisible] = useState(true)
|
||||||
|
|
||||||
|
if (!visible) return null
|
||||||
|
|
||||||
|
const splashKeyframe = new Keyframe({
|
||||||
|
0: {
|
||||||
|
transform: [{ scale: INITIAL_SCALE_FACTOR }],
|
||||||
|
opacity: 1,
|
||||||
|
},
|
||||||
|
20: {
|
||||||
|
opacity: 1,
|
||||||
|
},
|
||||||
|
70: {
|
||||||
|
opacity: 0,
|
||||||
|
easing: Easing.elastic(0.7),
|
||||||
|
},
|
||||||
|
100: {
|
||||||
|
opacity: 0,
|
||||||
|
transform: [{ scale: 1 }],
|
||||||
|
easing: Easing.elastic(0.7),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Animated.View
|
||||||
|
entering={splashKeyframe.duration(DURATION).withCallback((finished) => {
|
||||||
|
'worklet'
|
||||||
|
if (finished) {
|
||||||
|
scheduleOnRN(setVisible, false)
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
style={styles.backgroundSolidColor}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const keyframe = new Keyframe({
|
||||||
|
0: {
|
||||||
|
transform: [{ scale: INITIAL_SCALE_FACTOR }],
|
||||||
|
},
|
||||||
|
100: {
|
||||||
|
transform: [{ scale: 1 }],
|
||||||
|
easing: Easing.elastic(0.7),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const logoKeyframe = new Keyframe({
|
||||||
|
0: {
|
||||||
|
transform: [{ scale: 1.3 }],
|
||||||
|
opacity: 0,
|
||||||
|
},
|
||||||
|
40: {
|
||||||
|
transform: [{ scale: 1.3 }],
|
||||||
|
opacity: 0,
|
||||||
|
easing: Easing.elastic(0.7),
|
||||||
|
},
|
||||||
|
100: {
|
||||||
|
opacity: 1,
|
||||||
|
transform: [{ scale: 1 }],
|
||||||
|
easing: Easing.elastic(0.7),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const glowKeyframe = new Keyframe({
|
||||||
|
0: {
|
||||||
|
transform: [{ rotateZ: '0deg' }],
|
||||||
|
},
|
||||||
|
100: {
|
||||||
|
transform: [{ rotateZ: '7200deg' }],
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
export function AnimatedIcon() {
|
||||||
|
return (
|
||||||
|
<View style={styles.iconContainer}>
|
||||||
|
<Animated.View
|
||||||
|
entering={glowKeyframe.duration(60 * 1000 * 4)}
|
||||||
|
style={styles.glow}
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
style={styles.glow}
|
||||||
|
source={require('@/assets/images/logo-glow.png')}
|
||||||
|
/>
|
||||||
|
</Animated.View>
|
||||||
|
|
||||||
|
<Animated.View
|
||||||
|
entering={keyframe.duration(DURATION)}
|
||||||
|
style={styles.background}
|
||||||
|
/>
|
||||||
|
<Animated.View
|
||||||
|
style={styles.imageContainer}
|
||||||
|
entering={logoKeyframe.duration(DURATION)}
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
style={styles.image}
|
||||||
|
source={require('@/assets/images/expo-logo.png')}
|
||||||
|
/>
|
||||||
|
</Animated.View>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
imageContainer: {
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
glow: {
|
||||||
|
width: 201,
|
||||||
|
height: 201,
|
||||||
|
position: 'absolute',
|
||||||
|
},
|
||||||
|
iconContainer: {
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
width: 128,
|
||||||
|
height: 128,
|
||||||
|
zIndex: 100,
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
position: 'absolute',
|
||||||
|
width: 76,
|
||||||
|
height: 71,
|
||||||
|
},
|
||||||
|
background: {
|
||||||
|
borderRadius: 40,
|
||||||
|
experimental_backgroundImage: `linear-gradient(180deg, #3C9FFE, #0274DF)`,
|
||||||
|
width: 128,
|
||||||
|
height: 128,
|
||||||
|
position: 'absolute',
|
||||||
|
},
|
||||||
|
backgroundSolidColor: {
|
||||||
|
...StyleSheet.absoluteFillObject,
|
||||||
|
backgroundColor: '#208AEF',
|
||||||
|
zIndex: 1000,
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
import { Image } from 'expo-image'
|
||||||
|
import { StyleSheet, View } from 'react-native'
|
||||||
|
import Animated, { Easing, Keyframe } from 'react-native-reanimated'
|
||||||
|
|
||||||
|
import classes from './animated-icon.module.css'
|
||||||
|
|
||||||
|
const DURATION = 300
|
||||||
|
|
||||||
|
export function AnimatedSplashOverlay() {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
const keyframe = new Keyframe({
|
||||||
|
0: {
|
||||||
|
transform: [{ scale: 0 }],
|
||||||
|
},
|
||||||
|
60: {
|
||||||
|
transform: [{ scale: 1.2 }],
|
||||||
|
easing: Easing.elastic(1.2),
|
||||||
|
},
|
||||||
|
100: {
|
||||||
|
transform: [{ scale: 1 }],
|
||||||
|
easing: Easing.elastic(1.2),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const logoKeyframe = new Keyframe({
|
||||||
|
0: {
|
||||||
|
opacity: 0,
|
||||||
|
},
|
||||||
|
60: {
|
||||||
|
transform: [{ scale: 1.2 }],
|
||||||
|
opacity: 0,
|
||||||
|
easing: Easing.elastic(1.2),
|
||||||
|
},
|
||||||
|
100: {
|
||||||
|
transform: [{ scale: 1 }],
|
||||||
|
opacity: 1,
|
||||||
|
easing: Easing.elastic(1.2),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const glowKeyframe = new Keyframe({
|
||||||
|
0: {
|
||||||
|
transform: [{ rotateZ: '-180deg' }, { scale: 0.8 }],
|
||||||
|
opacity: 0,
|
||||||
|
},
|
||||||
|
[DURATION / 1000]: {
|
||||||
|
transform: [{ rotateZ: '0deg' }, { scale: 1 }],
|
||||||
|
opacity: 1,
|
||||||
|
easing: Easing.elastic(0.7),
|
||||||
|
},
|
||||||
|
100: {
|
||||||
|
transform: [{ rotateZ: '7200deg' }],
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
export function AnimatedIcon() {
|
||||||
|
return (
|
||||||
|
<View style={styles.iconContainer}>
|
||||||
|
<Animated.View
|
||||||
|
entering={glowKeyframe.duration(60 * 1000 * 4)}
|
||||||
|
style={styles.glow}
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
style={styles.glow}
|
||||||
|
source={require('@/assets/images/logo-glow.png')}
|
||||||
|
/>
|
||||||
|
</Animated.View>
|
||||||
|
|
||||||
|
<Animated.View
|
||||||
|
style={styles.background}
|
||||||
|
entering={keyframe.duration(DURATION)}
|
||||||
|
>
|
||||||
|
<div className={classes.expoLogoBackground} />
|
||||||
|
</Animated.View>
|
||||||
|
|
||||||
|
<Animated.View
|
||||||
|
style={styles.imageContainer}
|
||||||
|
entering={logoKeyframe.duration(DURATION)}
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
style={styles.image}
|
||||||
|
source={require('@/assets/images/expo-logo.png')}
|
||||||
|
/>
|
||||||
|
</Animated.View>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
alignItems: 'center',
|
||||||
|
width: '100%',
|
||||||
|
zIndex: 1000,
|
||||||
|
position: 'absolute',
|
||||||
|
top: 128 / 2 + 138,
|
||||||
|
},
|
||||||
|
imageContainer: {
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
glow: {
|
||||||
|
width: 201,
|
||||||
|
height: 201,
|
||||||
|
position: 'absolute',
|
||||||
|
},
|
||||||
|
iconContainer: {
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
width: 128,
|
||||||
|
height: 128,
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
position: 'absolute',
|
||||||
|
width: 76,
|
||||||
|
height: 71,
|
||||||
|
},
|
||||||
|
background: {
|
||||||
|
width: 128,
|
||||||
|
height: 128,
|
||||||
|
position: 'absolute',
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import { NativeTabs } from 'expo-router/unstable-native-tabs'
|
||||||
|
import { useColorScheme } from 'react-native'
|
||||||
|
|
||||||
|
import { Colors } from '@/constants/theme'
|
||||||
|
|
||||||
|
export default function AppTabs() {
|
||||||
|
const scheme = useColorScheme()
|
||||||
|
const colors = Colors[scheme === 'unspecified' ? 'light' : scheme]
|
||||||
|
|
||||||
|
return (
|
||||||
|
<NativeTabs
|
||||||
|
backgroundColor={colors.background}
|
||||||
|
indicatorColor={colors.backgroundElement}
|
||||||
|
labelStyle={{ selected: { color: colors.text } }}
|
||||||
|
>
|
||||||
|
<NativeTabs.Trigger name="index">
|
||||||
|
<NativeTabs.Trigger.Label>Home</NativeTabs.Trigger.Label>
|
||||||
|
<NativeTabs.Trigger.Icon
|
||||||
|
src={require('@/assets/images/tabIcons/home.png')}
|
||||||
|
renderingMode="template"
|
||||||
|
/>
|
||||||
|
</NativeTabs.Trigger>
|
||||||
|
|
||||||
|
<NativeTabs.Trigger name="explore">
|
||||||
|
<NativeTabs.Trigger.Label>Explore</NativeTabs.Trigger.Label>
|
||||||
|
<NativeTabs.Trigger.Icon
|
||||||
|
src={require('@/assets/images/tabIcons/explore.png')}
|
||||||
|
renderingMode="template"
|
||||||
|
/>
|
||||||
|
</NativeTabs.Trigger>
|
||||||
|
</NativeTabs>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
import {
|
||||||
|
TabList,
|
||||||
|
type TabListProps,
|
||||||
|
TabSlot,
|
||||||
|
Tabs,
|
||||||
|
TabTrigger,
|
||||||
|
type TabTriggerSlotProps,
|
||||||
|
} from 'expo-router/ui'
|
||||||
|
import { SymbolView } from 'expo-symbols'
|
||||||
|
import { Pressable, StyleSheet, useColorScheme, View } from 'react-native'
|
||||||
|
import { Colors, MaxContentWidth, Spacing } from '@/constants/theme'
|
||||||
|
import { ExternalLink } from './external-link'
|
||||||
|
import { ThemedText } from './themed-text'
|
||||||
|
import { ThemedView } from './themed-view'
|
||||||
|
|
||||||
|
export default function AppTabs() {
|
||||||
|
return (
|
||||||
|
<Tabs>
|
||||||
|
<TabSlot style={{ height: '100%' }} />
|
||||||
|
<TabList asChild>
|
||||||
|
<CustomTabList>
|
||||||
|
<TabTrigger name="home" href="/" asChild>
|
||||||
|
<TabButton>Home</TabButton>
|
||||||
|
</TabTrigger>
|
||||||
|
<TabTrigger name="explore" href="/explore" asChild>
|
||||||
|
<TabButton>Explore</TabButton>
|
||||||
|
</TabTrigger>
|
||||||
|
</CustomTabList>
|
||||||
|
</TabList>
|
||||||
|
</Tabs>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function TabButton({
|
||||||
|
children,
|
||||||
|
isFocused,
|
||||||
|
...props
|
||||||
|
}: TabTriggerSlotProps) {
|
||||||
|
return (
|
||||||
|
<Pressable {...props} style={({ pressed }) => pressed && styles.pressed}>
|
||||||
|
<ThemedView
|
||||||
|
type={isFocused ? 'backgroundSelected' : 'backgroundElement'}
|
||||||
|
style={styles.tabButtonView}
|
||||||
|
>
|
||||||
|
<ThemedText
|
||||||
|
type="small"
|
||||||
|
themeColor={isFocused ? 'text' : 'textSecondary'}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</ThemedText>
|
||||||
|
</ThemedView>
|
||||||
|
</Pressable>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function CustomTabList(props: TabListProps) {
|
||||||
|
const scheme = useColorScheme()
|
||||||
|
const colors = Colors[scheme === 'unspecified' ? 'light' : scheme]
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View {...props} style={styles.tabListContainer}>
|
||||||
|
<ThemedView type="backgroundElement" style={styles.innerContainer}>
|
||||||
|
<ThemedText type="smallBold" style={styles.brandText}>
|
||||||
|
Expo Starter
|
||||||
|
</ThemedText>
|
||||||
|
|
||||||
|
{props.children}
|
||||||
|
|
||||||
|
<ExternalLink href="https://docs.expo.dev" asChild>
|
||||||
|
<Pressable style={styles.externalPressable}>
|
||||||
|
<ThemedText type="link">Docs</ThemedText>
|
||||||
|
<SymbolView
|
||||||
|
tintColor={colors.text}
|
||||||
|
name={{ ios: 'arrow.up.right.square', web: 'link' }}
|
||||||
|
size={12}
|
||||||
|
/>
|
||||||
|
</Pressable>
|
||||||
|
</ExternalLink>
|
||||||
|
</ThemedView>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
tabListContainer: {
|
||||||
|
position: 'absolute',
|
||||||
|
width: '100%',
|
||||||
|
padding: Spacing.three,
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
},
|
||||||
|
innerContainer: {
|
||||||
|
paddingVertical: Spacing.two,
|
||||||
|
paddingHorizontal: Spacing.five,
|
||||||
|
borderRadius: Spacing.five,
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
flexGrow: 1,
|
||||||
|
gap: Spacing.two,
|
||||||
|
maxWidth: MaxContentWidth,
|
||||||
|
},
|
||||||
|
brandText: {
|
||||||
|
marginRight: 'auto',
|
||||||
|
},
|
||||||
|
pressed: {
|
||||||
|
opacity: 0.7,
|
||||||
|
},
|
||||||
|
tabButtonView: {
|
||||||
|
paddingVertical: Spacing.one,
|
||||||
|
paddingHorizontal: Spacing.three,
|
||||||
|
borderRadius: Spacing.three,
|
||||||
|
},
|
||||||
|
externalPressable: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: Spacing.one,
|
||||||
|
marginLeft: Spacing.three,
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import { type Href, Link } from 'expo-router'
|
||||||
|
import { openBrowserAsync, WebBrowserPresentationStyle } from 'expo-web-browser'
|
||||||
|
import type { ComponentProps } from 'react'
|
||||||
|
|
||||||
|
type Props = Omit<ComponentProps<typeof Link>, 'href'> & { href: Href & string }
|
||||||
|
|
||||||
|
export function ExternalLink({ href, ...rest }: Props) {
|
||||||
|
return (
|
||||||
|
<Link
|
||||||
|
target="_blank"
|
||||||
|
{...rest}
|
||||||
|
href={href}
|
||||||
|
onPress={async (event) => {
|
||||||
|
if (process.env.EXPO_OS !== 'web') {
|
||||||
|
// Prevent the default behavior of linking to the default browser on native.
|
||||||
|
event.preventDefault()
|
||||||
|
// Open the link in an in-app browser.
|
||||||
|
await openBrowserAsync(href, {
|
||||||
|
presentationStyle: WebBrowserPresentationStyle.AUTOMATIC,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import type { ReactNode } from 'react'
|
||||||
|
import { StyleSheet, View } from 'react-native'
|
||||||
|
import { Spacing } from '@/constants/theme'
|
||||||
|
import { ThemedText } from './themed-text'
|
||||||
|
import { ThemedView } from './themed-view'
|
||||||
|
|
||||||
|
type HintRowProps = {
|
||||||
|
title?: string
|
||||||
|
hint?: ReactNode
|
||||||
|
}
|
||||||
|
|
||||||
|
export function HintRow({
|
||||||
|
title = 'Try editing',
|
||||||
|
hint = 'app/index.tsx',
|
||||||
|
}: HintRowProps) {
|
||||||
|
return (
|
||||||
|
<View style={styles.stepRow}>
|
||||||
|
<ThemedText type="small">{title}</ThemedText>
|
||||||
|
<ThemedView type="backgroundSelected" style={styles.codeSnippet}>
|
||||||
|
<ThemedText themeColor="textSecondary">{hint}</ThemedText>
|
||||||
|
</ThemedView>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
stepRow: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
},
|
||||||
|
codeSnippet: {
|
||||||
|
borderRadius: Spacing.two,
|
||||||
|
paddingVertical: Spacing.half,
|
||||||
|
paddingHorizontal: Spacing.two,
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
import { Platform, StyleSheet, Text, type TextProps } from 'react-native'
|
||||||
|
|
||||||
|
import { Fonts, type ThemeColor } from '@/constants/theme'
|
||||||
|
import { useTheme } from '@/hooks/use-theme'
|
||||||
|
|
||||||
|
export type ThemedTextProps = TextProps & {
|
||||||
|
type?:
|
||||||
|
| 'default'
|
||||||
|
| 'title'
|
||||||
|
| 'small'
|
||||||
|
| 'smallBold'
|
||||||
|
| 'subtitle'
|
||||||
|
| 'link'
|
||||||
|
| 'linkPrimary'
|
||||||
|
| 'code'
|
||||||
|
themeColor?: ThemeColor
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ThemedText({
|
||||||
|
style,
|
||||||
|
type = 'default',
|
||||||
|
themeColor,
|
||||||
|
...rest
|
||||||
|
}: ThemedTextProps) {
|
||||||
|
const theme = useTheme()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Text
|
||||||
|
style={[
|
||||||
|
{ color: theme[themeColor ?? 'text'] },
|
||||||
|
type === 'default' && styles.default,
|
||||||
|
type === 'title' && styles.title,
|
||||||
|
type === 'small' && styles.small,
|
||||||
|
type === 'smallBold' && styles.smallBold,
|
||||||
|
type === 'subtitle' && styles.subtitle,
|
||||||
|
type === 'link' && styles.link,
|
||||||
|
type === 'linkPrimary' && styles.linkPrimary,
|
||||||
|
type === 'code' && styles.code,
|
||||||
|
style,
|
||||||
|
]}
|
||||||
|
{...rest}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
small: {
|
||||||
|
fontSize: 14,
|
||||||
|
lineHeight: 20,
|
||||||
|
fontWeight: 500,
|
||||||
|
},
|
||||||
|
smallBold: {
|
||||||
|
fontSize: 14,
|
||||||
|
lineHeight: 20,
|
||||||
|
fontWeight: 700,
|
||||||
|
},
|
||||||
|
default: {
|
||||||
|
fontSize: 16,
|
||||||
|
lineHeight: 24,
|
||||||
|
fontWeight: 500,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
fontSize: 48,
|
||||||
|
fontWeight: 600,
|
||||||
|
lineHeight: 52,
|
||||||
|
},
|
||||||
|
subtitle: {
|
||||||
|
fontSize: 32,
|
||||||
|
lineHeight: 44,
|
||||||
|
fontWeight: 600,
|
||||||
|
},
|
||||||
|
link: {
|
||||||
|
lineHeight: 30,
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
linkPrimary: {
|
||||||
|
lineHeight: 30,
|
||||||
|
fontSize: 14,
|
||||||
|
color: '#3c87f7',
|
||||||
|
},
|
||||||
|
code: {
|
||||||
|
fontFamily: Fonts.mono,
|
||||||
|
fontWeight: Platform.select({ android: 700 }) ?? 500,
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import { View, type ViewProps } from 'react-native'
|
||||||
|
|
||||||
|
import type { ThemeColor } from '@/constants/theme'
|
||||||
|
import { useTheme } from '@/hooks/use-theme'
|
||||||
|
|
||||||
|
export type ThemedViewProps = ViewProps & {
|
||||||
|
lightColor?: string
|
||||||
|
darkColor?: string
|
||||||
|
type?: ThemeColor
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ThemedView({
|
||||||
|
style,
|
||||||
|
lightColor,
|
||||||
|
darkColor,
|
||||||
|
type,
|
||||||
|
...otherProps
|
||||||
|
}: ThemedViewProps) {
|
||||||
|
const theme = useTheme()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View
|
||||||
|
style={[{ backgroundColor: theme[type ?? 'background'] }, style]}
|
||||||
|
{...otherProps}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
import { SymbolView } from 'expo-symbols'
|
||||||
|
import { type PropsWithChildren, useState } from 'react'
|
||||||
|
import { Pressable, StyleSheet } from 'react-native'
|
||||||
|
import Animated, { FadeIn } from 'react-native-reanimated'
|
||||||
|
|
||||||
|
import { ThemedText } from '@/components/themed-text'
|
||||||
|
import { ThemedView } from '@/components/themed-view'
|
||||||
|
import { Spacing } from '@/constants/theme'
|
||||||
|
import { useTheme } from '@/hooks/use-theme'
|
||||||
|
|
||||||
|
export function Collapsible({
|
||||||
|
children,
|
||||||
|
title,
|
||||||
|
}: PropsWithChildren & { title: string }) {
|
||||||
|
const [isOpen, setIsOpen] = useState(false)
|
||||||
|
const theme = useTheme()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ThemedView>
|
||||||
|
<Pressable
|
||||||
|
style={({ pressed }) => [
|
||||||
|
styles.heading,
|
||||||
|
pressed && styles.pressedHeading,
|
||||||
|
]}
|
||||||
|
onPress={() => setIsOpen((value) => !value)}
|
||||||
|
>
|
||||||
|
<ThemedView type="backgroundElement" style={styles.button}>
|
||||||
|
<SymbolView
|
||||||
|
name={{
|
||||||
|
ios: 'chevron.right',
|
||||||
|
android: 'chevron_right',
|
||||||
|
web: 'chevron_right',
|
||||||
|
}}
|
||||||
|
size={14}
|
||||||
|
weight="bold"
|
||||||
|
tintColor={theme.text}
|
||||||
|
style={{ transform: [{ rotate: isOpen ? '-90deg' : '90deg' }] }}
|
||||||
|
/>
|
||||||
|
</ThemedView>
|
||||||
|
|
||||||
|
<ThemedText type="small">{title}</ThemedText>
|
||||||
|
</Pressable>
|
||||||
|
{isOpen && (
|
||||||
|
<Animated.View entering={FadeIn.duration(200)}>
|
||||||
|
<ThemedView type="backgroundElement" style={styles.content}>
|
||||||
|
{children}
|
||||||
|
</ThemedView>
|
||||||
|
</Animated.View>
|
||||||
|
)}
|
||||||
|
</ThemedView>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
heading: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: Spacing.two,
|
||||||
|
},
|
||||||
|
pressedHeading: {
|
||||||
|
opacity: 0.7,
|
||||||
|
},
|
||||||
|
button: {
|
||||||
|
width: Spacing.four,
|
||||||
|
height: Spacing.four,
|
||||||
|
borderRadius: 12,
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
marginTop: Spacing.three,
|
||||||
|
borderRadius: Spacing.three,
|
||||||
|
marginLeft: Spacing.four,
|
||||||
|
padding: Spacing.four,
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
import { version } from 'expo/package.json'
|
||||||
|
import { Image } from 'expo-image'
|
||||||
|
import { StyleSheet, useColorScheme } from 'react-native'
|
||||||
|
import { Spacing } from '@/constants/theme'
|
||||||
|
import { ThemedText } from './themed-text'
|
||||||
|
import { ThemedView } from './themed-view'
|
||||||
|
|
||||||
|
export function WebBadge() {
|
||||||
|
const scheme = useColorScheme()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ThemedView style={styles.container}>
|
||||||
|
<ThemedText
|
||||||
|
type="code"
|
||||||
|
themeColor="textSecondary"
|
||||||
|
style={styles.versionText}
|
||||||
|
>
|
||||||
|
v{version}
|
||||||
|
</ThemedText>
|
||||||
|
<Image
|
||||||
|
source={
|
||||||
|
scheme === 'dark'
|
||||||
|
? require('@/assets/images/expo-badge-white.png')
|
||||||
|
: require('@/assets/images/expo-badge.png')
|
||||||
|
}
|
||||||
|
style={styles.badgeImage}
|
||||||
|
/>
|
||||||
|
</ThemedView>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
padding: Spacing.five,
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: Spacing.two,
|
||||||
|
},
|
||||||
|
versionText: {
|
||||||
|
textAlign: 'center',
|
||||||
|
},
|
||||||
|
badgeImage: {
|
||||||
|
width: 123,
|
||||||
|
aspectRatio: 123 / 24,
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
/**
|
||||||
|
* Below are the colors that are used in the app. The colors are defined in the light and dark mode.
|
||||||
|
* There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import '@/global.css'
|
||||||
|
|
||||||
|
import { Platform } from 'react-native'
|
||||||
|
|
||||||
|
export const Colors = {
|
||||||
|
light: {
|
||||||
|
text: '#000000',
|
||||||
|
background: '#ffffff',
|
||||||
|
backgroundElement: '#F0F0F3',
|
||||||
|
backgroundSelected: '#E0E1E6',
|
||||||
|
textSecondary: '#60646C',
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
text: '#ffffff',
|
||||||
|
background: '#000000',
|
||||||
|
backgroundElement: '#212225',
|
||||||
|
backgroundSelected: '#2E3135',
|
||||||
|
textSecondary: '#B0B4BA',
|
||||||
|
},
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type ThemeColor = keyof typeof Colors.light & keyof typeof Colors.dark
|
||||||
|
|
||||||
|
export const Fonts = Platform.select({
|
||||||
|
ios: {
|
||||||
|
/** iOS `UIFontDescriptorSystemDesignDefault` */
|
||||||
|
sans: 'system-ui',
|
||||||
|
/** iOS `UIFontDescriptorSystemDesignSerif` */
|
||||||
|
serif: 'ui-serif',
|
||||||
|
/** iOS `UIFontDescriptorSystemDesignRounded` */
|
||||||
|
rounded: 'ui-rounded',
|
||||||
|
/** iOS `UIFontDescriptorSystemDesignMonospaced` */
|
||||||
|
mono: 'ui-monospace',
|
||||||
|
},
|
||||||
|
default: {
|
||||||
|
sans: 'normal',
|
||||||
|
serif: 'serif',
|
||||||
|
rounded: 'normal',
|
||||||
|
mono: 'monospace',
|
||||||
|
},
|
||||||
|
web: {
|
||||||
|
sans: 'var(--font-display)',
|
||||||
|
serif: 'var(--font-serif)',
|
||||||
|
rounded: 'var(--font-rounded)',
|
||||||
|
mono: 'var(--font-mono)',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
export const Spacing = {
|
||||||
|
half: 2,
|
||||||
|
one: 4,
|
||||||
|
two: 8,
|
||||||
|
three: 16,
|
||||||
|
four: 24,
|
||||||
|
five: 32,
|
||||||
|
six: 64,
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export const BottomTabInset = Platform.select({ ios: 50, android: 80 }) ?? 0
|
||||||
|
export const MaxContentWidth = 800
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
declare module '*.module.css' {
|
||||||
|
const classes: { readonly [key: string]: string }
|
||||||
|
export default classes
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
:root {
|
||||||
|
--font-display:
|
||||||
|
Spline Sans, Inter, ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji,
|
||||||
|
Segoe UI Symbol, Noto Color Emoji;
|
||||||
|
--font-mono:
|
||||||
|
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono,
|
||||||
|
Courier New, monospace;
|
||||||
|
--font-rounded:
|
||||||
|
"SF Pro Rounded", "Hiragino Maru Gothic ProN", Meiryo, "MS PGothic",
|
||||||
|
sans-serif;
|
||||||
|
--font-serif: Georgia, "Times New Roman", serif;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export { useColorScheme } from 'react-native'
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
import { useColorScheme as useRNColorScheme } from 'react-native'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To support static rendering, this value needs to be re-calculated on the client side for web
|
||||||
|
*/
|
||||||
|
export function useColorScheme() {
|
||||||
|
const [hasHydrated, setHasHydrated] = useState(false)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setHasHydrated(true)
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
const colorScheme = useRNColorScheme()
|
||||||
|
|
||||||
|
if (hasHydrated) {
|
||||||
|
return colorScheme
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'light'
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* Learn more about light and dark modes:
|
||||||
|
* https://docs.expo.dev/guides/color-schemes/
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { Colors } from '@/constants/theme'
|
||||||
|
import { useColorScheme } from '@/hooks/use-color-scheme'
|
||||||
|
|
||||||
|
export function useTheme() {
|
||||||
|
const scheme = useColorScheme()
|
||||||
|
const theme = scheme === 'unspecified' ? 'light' : scheme
|
||||||
|
|
||||||
|
return Colors[theme]
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"extends": ["../../tsconfig.json", "expo/tsconfig.base"],
|
||||||
|
"compilerOptions": {
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"],
|
||||||
|
"@/assets/*": ["./assets/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
|
||||||
|
"vcs": {
|
||||||
|
"enabled": true,
|
||||||
|
"clientKind": "git",
|
||||||
|
"useIgnoreFile": true
|
||||||
|
},
|
||||||
|
"files": {
|
||||||
|
"ignoreUnknown": true
|
||||||
|
},
|
||||||
|
"formatter": {
|
||||||
|
"enabled": true,
|
||||||
|
"indentStyle": "space",
|
||||||
|
"indentWidth": 2,
|
||||||
|
"lineEnding": "lf",
|
||||||
|
"lineWidth": 80,
|
||||||
|
"useEditorconfig": true
|
||||||
|
},
|
||||||
|
"linter": {
|
||||||
|
"enabled": true,
|
||||||
|
"rules": {
|
||||||
|
"recommended": true,
|
||||||
|
"complexity": {
|
||||||
|
"noExtraBooleanCast": "error",
|
||||||
|
"noUselessCatch": "error",
|
||||||
|
"noUselessTypeConstraint": "error"
|
||||||
|
},
|
||||||
|
"correctness": {
|
||||||
|
"noConstAssign": "error",
|
||||||
|
"noConstantCondition": "error",
|
||||||
|
"noGlobalObjectCalls": "error",
|
||||||
|
"noInvalidConstructorSuper": "error",
|
||||||
|
"noPrecisionLoss": "error",
|
||||||
|
"noSelfAssign": "error",
|
||||||
|
"noSwitchDeclarations": "error",
|
||||||
|
"noUndeclaredVariables": "error",
|
||||||
|
"noUnreachable": "error",
|
||||||
|
"noUnsafeFinally": "error",
|
||||||
|
"noUnsafeOptionalChaining": "error",
|
||||||
|
"noUnusedVariables": "error",
|
||||||
|
"noUnusedPrivateClassMembers": "error"
|
||||||
|
},
|
||||||
|
"style": {
|
||||||
|
"noCommonJs": "error",
|
||||||
|
"noNamespace": "error",
|
||||||
|
"useAsConstAssertion": "error",
|
||||||
|
"useBlockStatements": "off",
|
||||||
|
"useConsistentArrowReturn": "off"
|
||||||
|
},
|
||||||
|
"suspicious": {
|
||||||
|
"noDebugger": "error",
|
||||||
|
"noEmptyBlockStatements": "error",
|
||||||
|
"noExplicitAny": "error",
|
||||||
|
"noFallthroughSwitchClause": "error",
|
||||||
|
"noGlobalAssign": "error",
|
||||||
|
"noRedeclare": "error",
|
||||||
|
"noShadowRestrictedNames": "error",
|
||||||
|
"noUnusedExpressions": "off",
|
||||||
|
"useAwait": "error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"javascript": {
|
||||||
|
"formatter": {
|
||||||
|
"quoteProperties": "asNeeded",
|
||||||
|
"trailingCommas": "all",
|
||||||
|
"semicolons": "asNeeded",
|
||||||
|
"arrowParentheses": "always",
|
||||||
|
"quoteStyle": "single",
|
||||||
|
"bracketSpacing": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"includes": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
|
||||||
|
"linter": {
|
||||||
|
"rules": {
|
||||||
|
"complexity": { "noArguments": "error" },
|
||||||
|
"correctness": {
|
||||||
|
"noConstAssign": "off",
|
||||||
|
"noGlobalObjectCalls": "off",
|
||||||
|
"noInvalidConstructorSuper": "off",
|
||||||
|
"noUndeclaredVariables": "off",
|
||||||
|
"noUnreachable": "off"
|
||||||
|
},
|
||||||
|
"style": { "useConst": "error" },
|
||||||
|
"suspicious": {
|
||||||
|
"noDuplicateClassMembers": "off",
|
||||||
|
"noFunctionAssign": "off",
|
||||||
|
"noImportAssign": "off",
|
||||||
|
"noRedeclare": "off",
|
||||||
|
"noVar": "error",
|
||||||
|
"useGetterReturn": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"assist": {
|
||||||
|
"enabled": true,
|
||||||
|
"actions": {
|
||||||
|
"source": {
|
||||||
|
"organizeImports": "on"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
pre-commit:
|
||||||
|
commands:
|
||||||
|
check:
|
||||||
|
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
|
||||||
|
run: pnpm exec biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
|
||||||
|
stage_fixed: true
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "blog-nest",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"build": "turbo run build",
|
||||||
|
"check-types": "turbo run check-types",
|
||||||
|
"clean": "turbo run clean",
|
||||||
|
"dev": "turbo run dev --filter='./apps/*'",
|
||||||
|
"format": "turbo run format",
|
||||||
|
"lint": "turbo run lint",
|
||||||
|
"test": "turbo run test"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"packageManager": "[email protected]",
|
||||||
|
"devDependencies": {
|
||||||
|
"@biomejs/biome": "2.4.6",
|
||||||
|
"lefthook": "^2.1.2",
|
||||||
|
"turbo": "^2.8.13"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
packages:
|
||||||
|
- apps/*
|
||||||
|
- packages/*
|
||||||
|
|
||||||
|
nodeLinker: hoisted
|
||||||
|
|
||||||
|
onlyBuiltDependencies:
|
||||||
|
- '@nestjs/core'
|
||||||
|
- lefthook
|
||||||
|
- sharp
|
||||||
|
- unrs-resolver
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"strict": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"incremental": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"noUncheckedIndexedAccess": true
|
||||||
|
},
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"globalEnv": ["NODE_ENV"],
|
||||||
|
"tasks": {
|
||||||
|
"build": {
|
||||||
|
"dependsOn": ["^build"],
|
||||||
|
"outputs": [".next/**", "dist/**"],
|
||||||
|
"env": ["API_PORT", "NEXT_PUBLIC_*", "EXPO_PUBLIC_*"]
|
||||||
|
},
|
||||||
|
"check-types": {
|
||||||
|
"dependsOn": ["^build"]
|
||||||
|
},
|
||||||
|
"clean": {
|
||||||
|
"cache": false
|
||||||
|
},
|
||||||
|
"dev": {
|
||||||
|
"cache": false,
|
||||||
|
"persistent": true
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"dependsOn": ["^build"]
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"dependsOn": ["^build"],
|
||||||
|
"env": ["API_PORT"]
|
||||||
|
},
|
||||||
|
"format": {
|
||||||
|
"cache": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ui": "stream"
|
||||||
|
}
|
||||||