Skip to content

Commit

Permalink
feat: 地图搜索跳转
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangnuans committed Oct 5, 2024
1 parent 0c388c2 commit 08d8010
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 215 deletions.
11 changes: 0 additions & 11 deletions .env
Original file line number Diff line number Diff line change
@@ -1,11 +0,0 @@
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema

# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB (Preview) and CockroachDB (Preview).
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

# Defaults to the local database deployed from the `docker-compose.yml` stack

DATABASE_URL="postgresql://root:[email protected]:5432/ton_nft_db"
# 测试环境
# DATABASE_URL="postgresql://root:[email protected]:5432/ton_nft_db"
Empty file removed .env.example
Empty file.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
Expand Down
169 changes: 41 additions & 128 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,128 +1,41 @@
# Ton NFT Turborepo

## What's inside?

This turborepo includes the following packages/apps:

### Apps and Packages

- `miniapp`: a [Next.js](https://nextjs.org/) telegram mini app
- `admin-panel`: a [Next.js](https://nextjs.org/) admin panel
- `contracts`: TON contracts folder
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
- `@repo/database`: [Prisma](https://prisma.io/) ORM wrapper to manage & access your database
- `@repo/react-query`: [Tanstack Query](https://tanstack.com/query/latest/docs) data-fetching library

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).

### Utilities

This turborepo has some additional tools already setup for you:

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting
- [Prisma](https://prisma.io/) for database ORM
- [Docker Compose](https://docs.docker.com/compose/) for local database

### Database

We use [Prisma](https://prisma.io/) to manage & access our database. As such you will need a database for this project, either locally or hosted in the cloud.

To make this process easier, we offer a [`docker-compose.yml`](https://docs.docker.com/compose/) file to deploy a Postgres server locally with a new database named `ton_nft_db`

```bash
cd my-turborepo
docker-compose up -d
```

Once deployed you will need to copy the `.env.example` file to `.env` in order for Prisma to have a `DATABASE_URL` environment variable to access.

```bash
cp .env.example .env
```

If you added a custom database name, or use a cloud based database, you will need to update the `DATABASE_URL` in your `.env` accordingly.

Once deployed & up & running, you will need to create & deploy migrations to your database to add the necessary tables. This can be done using `generate`

```bash
cd packages/database
pnpm db:generate
```

If you need to push any existing migrations to the database, you can use either the Prisma db push or the Prisma migrate deploy command(s):

```bash
pnpm db:push

```

There is slight difference between the two commands & [Prisma offers a breakdown on which command is best to use](https://www.prisma.io/docs/concepts/components/prisma-migrate/db-push#choosing-db-push-or-prisma-migrate).

An optional additional step is to seed some initial or fake data to your database using [Prisma's seeding functionality](https://www.prisma.io/docs/guides/database/seed-database).

To do this update check the seed script located in `packages/database/src/seed.ts` & add or update any users you wish to seed to the database.

Once edited run the following command to run tell Prisma to run the seed script defined in the Prisma configuration:

```bash
pnpm db:seed
```

For further more information on migrations, seeding & more, we recommend reading through the [Prisma Documentation](https://www.prisma.io/docs/).

### Build

To build all apps and packages, run the following command:

```bash
pnpm build
```

### Develop

To develop all apps and packages, run the following command:

```bash
pnpm dev
```

## Install Packages

[doc link](https://turbo.build/repo/docs/crafting-your-repository/managing-dependencies)

```bash
pnpm add react-icons --recursive --filter=miniapp --filter=admin-panel
```

## Update Packages

```bash
pnpm up --recursive typescript@latest
```

## Clean cache

```bash
pnpm prune
```



## Useful Links

Learn more about the power of Turborepo:

- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)


## 服务端部署

### 部署报错 ../../prisma/xxxx时 进入到 packages/database 执行 npx prisma generate
Welcome to LeaseHub! Our platform revolutionizes real estate management by allowing property owners to tokenize their assets, providing a flexible way to manage ownership and generate income.

Project Overview
LeaseHub aims to offer a new approach to property management for owners and a unique accommodation experience for travel enthusiasts.

For Property Owners
Rent Out Properties: List your properties for rent and earn rental income.
Tokenize Assets: Sell partial ownership of your property as tokens to gain liquidity in SOL (Solana).
Delist Properties: Remove your property from the platform if you own all tokens.
For Token Holders
Earn Rental Income: Receive a share of the rental income proportional to your token ownership.
Trade Tokens: Sell your property tokens to gain liquidity in SOL.
For Travelers
Stake SOL: Both regular users and property owners can stake SOL to earn reward tokens.
Book Accommodations: Use earned reward tokens to pay for property rentals.
For Investors
Purchase Property Tokens: Invest in desirable properties by buying tokens using SOL.
Key Features
Decentralized property management
Fractional ownership through tokenization
Passive income generation
Flexible investment opportunities
Reward system for platform engagement
Technology Stack
Blockchain: Solana
Smart Contracts: Rust
Frontend: React.js
Backend: Node.js
How to Contribute
We welcome developers and users interested in LeaseHub to contribute to our project. To get involved:

Fork the Repository: Create your own copy of the project on GitHub.
Create a Branch: Make a new branch for your feature or bug fix.
Make Changes: Implement your changes and commit them.
Submit a Pull Request: Share your contributions with us through a GitHub Pull Request.
Contact Us
For any questions or suggestions, please reach out:

Email: [email protected]
Social Media: Twitter | Telegram
Thank you for your interest in LeaseHub! Together, let's shape the future of real estate.
66 changes: 0 additions & 66 deletions apps/web/lib.ts

This file was deleted.

9 changes: 0 additions & 9 deletions apps/web/middleware.ts

This file was deleted.

Binary file removed contracts.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3"
services:
postgres:
image: postgres:15
container_name: ton_nft_db
container_name: test
restart: always
ports:
- 5432:5432
Expand Down

0 comments on commit 08d8010

Please sign in to comment.