Skip to content

Commit

Permalink
chore: august 2nd release (#319)
Browse files Browse the repository at this point in the history
* chore: add @types/uuid

* chore: add @types/uuid

* fix(app-lib): tsconfig pkg extends

* fix: missing encoding dep

* feat: sitemap (#290)

* feat: add sitemap

* fix: error handling

* fix: move common types

* fix: update base url in sitemap

* Update apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Update apps/webapp/app/(routes)/[lang]/wallet/sitemap.ts

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Update apps/webapp/app/(routes)/[lang]/whitepaper/sitemap.ts

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* fix: build error

* fix: remove unnecessary async declarative

* vendor: add @types/uuid

* fix: remove console log for debug

* fix: add 'async' to all sitemaps

* fix: make ProjectPageParams extends CommonPageParams

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* fix(webapp): UI/UX tweaks and upts from final v1 landing designs (#291)

* (webapp)fix:FAQ border radi + muted color

* (webapp)fix:newsletter spacing

* (webapp)fix:participate spacing and font family

* (webapp)fix:header spacing + bitlauncher logo size

* (webapp)fix:blog section 4 per row + purple link + gap

* (webapp)fix:hero-card spacing

* (webapp)fix:auction-card spaces

* (webapp)fix:Upcoming grid gap

* (webapp)fix:article card - text-left

* (webapp)fix:media-card text-start

* (webapp)fix:media-section purple link + space

* (webapp)fix:participate gap + section font and padding

* (webapp)fix:footer links padding + other spacing fix

* (webapp)fix:upcoming background circle

* (webapp)fix:footer margin-10

* (webapp)fix:upcoming bg shape

* (webapp)-andler-changes-request

* (webapp)-debug-toggle navigation icon

* (webapp)-create-mobile-navigation-context

* (webapp)-create-mobile-navigation-context

* (webapp)-fix navigation bug - add key

* (webapp)-Andler-changes

* (webapp)-responsive - upcoming

* (webapp)-fix-responsive-whychooseUs

* (webapp)-fix-responsive-participate

* (webapp)-fix-responsive-media

* (webapp)-fix-responsive-articles

* (webapp)-responsive-project-header+info+sharebtn

* (webapp)-feat-about-base

* (webapp)-feat-about-landing-complete

* (webapp)-feat-security-updated

* (webapp)-fix-steps-padding

* fix typo

* fix bgHeader type

* fix bgHeader type

* impr(webapp): layout tweaks

* impr(webapp): info pages img asset + css class

* fix: bun.lockb

---------

Co-authored-by: Roberto Lucas <[email protected]>

* feat: multichain indexer ( part 1 ) (#293)

* chore: update app-contracts

* feat: multichain indexer

* feat: prod chains

* feat: presale wallet

* feat: blpl token

* feat: blpl token

* chore: update bunlock

* feat: blpl token

* feat: presale evm contribs

* feat: blpl token

* wip: presale indexer

* chore(indexer): fix dockerfile

* feat: presale transaction indexing (#296)

* feat: report transaction id

* feat: save deposits data

* feat: save deposits data

* feat: read presale transactions

* chore: disable view all

* feat: update presale deposits ui

* feat: display amount raised and contributors

* chore: environment chains and tokens

* fix(webapp): desktop padding (#297)

* feat: multichain presale deposits (#298)

* chore: environment chains and tokens

* fix: chain switch

* fix: chain switch

* feat: update nav links (#299)

* chore: environment chains and tokens

* feat: update nav links

* chore: renable swaps service, index token from latest block

* feat(webapp): wallet ui updates (#300)

* fix: wagmi config

* feat(webapp): presale contribution report

* feat: realtime presale data

* feat: realtime presale data

* feat: update dropdown menu

* feat(supabase): update schema and types

* chore: debug presale token issuance

* feat: show issuance trx link on table

* impr(webapp): upt mob ver of more info cards (#294) (#305)

* styles: update mobile version for information cards of home page

* styles: use tailwind css variables

* styles: add font family futura pt

* styles, config: add cornflowerblue variables on tailwind config and update information cards' background

* config: update font importation

* chore: replace BC with BL

* chore: replace bc files with bl files

* chore: replace bc files with bl files

---------

Co-authored-by: Leandro Gavidia Santamaria <[email protected]>

* chore: august 2nd release [at TEST]  (#315)

* impr(webapp): upt mob ver of more info cards (#294)

* styles: update mobile version for information cards of home page

* styles: use tailwind css variables

* styles: add font family futura pt

* styles, config: add cornflowerblue variables on tailwind config and update information cards' background

* config: update font importation

* chore: replace BC with BL

* chore: replace bc files with bl files

* chore: replace bc files with bl files

---------

Co-authored-by: Roberto Lucas <[email protected]>

* fix(impr): verify font-style and text wording across landing (#309)

* fix(impr): verify font-style across landing

* fix(webapp): lufga bold font config

* fix(webapp): investor wording to contributor on texts

* fix(webapp): investors wording to contributors on texts (plural)

* chore(webapp): text, invest wording upt to contribute

* config: add multibase custom hook (#310)

* config: add multibase custom hook

* chore: update multibase hook and session hook

* chore: change inverted params

* impr(fix): multibase init call

---------

Co-authored-by: Roberto Lucas <[email protected]>

* feat: referral section ui - ver 0.1a (#311)

* chore(webapp): update gitignore

* chore: update cursor agent rules

* fix: action example on cursor rules

* fix: action example on cursor rules

* fix: action example on cursor rules

* feat(webapp): use dynamic loading in homepage (#313)

* feat: token issuance with trigger.dev and alchemy hooks - part 1 (#312)

* feat: alchemy transfer hooks

* feat(trigger): listen token transfers

* feat(app-lib): add pino logger

* feat(trigger): address activity handler

* feat(indexer): security updates and alchemy proxy

* fix(webapp): logger bug

* chore(indexer): sentry middleware and app config

* chore(indexer): cleanup

* chore: update bunlock

* docs: update readme

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* feat(indexer): trigger address activity job (#316)

* impr(webapp): check short link gen (#301)

* fix(webapp): desktop padding

* wip(imp): check user share link

* fix(webapp): error var name scope

* chore: updating supabase schema & types

* feat(webapp): user table short link + session upsert

* chore: use biome 🚀 (#317)

* chore: use biome

* chore: use biome

* chore(indexer): verify call with alchemy signing key (#318)

* devops(indexer): update dockerfile

* chore(indexer): cleanup

* chore: update gitignore

* debug(indexer): gcloud deployment

* debug(indexer): gcloud deployment

* debug(indexer): gcloud deployment

* debug(indexer): gcloud deployment

* debug(indexer): gcloud deployment

* fix(trigger): install right trigger.dev dep

---------

Co-authored-by: Leandro Gavidia Santamaria <[email protected]>
Co-authored-by: Gabo Esquivel <[email protected]>
Co-authored-by: Gabo Esquivel <[email protected]>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* fix: merge typo

* fix: tailwind font config

---------

Co-authored-by: Gabo Esquivel <[email protected]>
Co-authored-by: Nathanael Liu <[email protected]>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Brandon Fernández <[email protected]>
Co-authored-by: Leandro Gavidia Santamaria <[email protected]>
Co-authored-by: Gabo Esquivel <[email protected]>
  • Loading branch information
7 people authored Aug 22, 2024
1 parent 9192e2e commit 7e1c9ad
Show file tree
Hide file tree
Showing 848 changed files with 22,553 additions and 52,680 deletions.
156 changes: 89 additions & 67 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -1,70 +1,92 @@
You are an expert in Solidity, TypeScript, Node.js, Next.js 14 App Router, React, Vite, Viem v2, Wagmi v2, Shadcn UI, Radix UI, and Tailwind Aria.

GENERAL RULES

- Your responses should be concise, straightforward, and highly technical, focusing on accurate and applicable TypeScript code examples.
- Always use a functional declarative approach, avoid classes.
Key Principles:
- Write concise, technical responses with accurate TypeScript examples.
- Use functional, declarative programming. Avoid classes.
- Prefer iteration and modularization over duplication.
- When naming variables, be descriptive and use auxiliary verbs such as `does`, `has`, `is`, and `should`. For example, `isDisabled`, `isLoading`.
- Use lowercase with dash separators for directories and names, e.g., `components/auth-wizard`.
- Favor named exports over default exports in components.
- Favor Receive an Object, Return an Object (RORO) pattern.

JAVASCRIPT RULES

- Utilize the "function" keyword for defining pure functions and avoid semicolons at the end of statements.
- Use TypeScript for all code generations, adhering to functional programming principles.
- Favor TypeScript interface over type and avoid TypeScript enums, use maps instead.
- Prefer the following code order in your files:
- Exported Function component
- Subcomponents
- Helper functions
- Static content variables
- TypeScript types

DEPENDENCY VERSIONS
- ALWAYS use Next.js 14 App Router.
- ALWAYS use Wagmi v2.
- ALWAYS use Viem v2.

NEXTJS RULES

- Always use functional React components and TypeScript interfaces.
- Always use a declarative approach in JSX.
- Never use const for React components, only function.
- Always use Shadcn UI, Radix, and CSS Aria APIs. Shadcn UI inherits APIs from Radix and extends its functionality.
- ALWAYS responsive tailwind css best practices.
- ALWAYS use Tailwind CSS and Tailwind Aria attribute to animate components.
- Always put static content and TypeScript interfaces at the end of the file.
- Always use content variables for static content outside the render function of React components.
- Always use React components for dynamic content inside the render function of React components.
- Avoid 'use client', 'useEffect', 'setState' when possible, favor Tailwind Aria and Radix UI APIs exposed on Shadcn UI components.
- Always use Zod for form validation, import relevant Zod schemas before duplicating.
- Always wrap client components around a Suspense tag with fallback.
- Always use dynamic loading for components that are not relevant on the first print.
- Always set priority=1 to the largest image on the first print.
- Always use WebP extension and provide image size data set, lazy load all images not relevant on the first page print.

IMPORTANT CONVENTIONS

1. Always rely on the NextJS app router for state changes: Use the App Router for state changes through SSR and hydration first, and server actions as a second option. For example, pagination, filtering, sorting, etc., should use URL parameters and SSR.

2. Pay special attention to Web Vitals: LCP, CLS, and FID are the most critical metrics. Learn more about Web Vitals and NextJS: Core Web Vitals. This website uses Static Site Generation for all pages to improve the initial load time.

3. Avoid 'use client' as much as possible: Use it as a last resort when there's no other option. Server components are the default in NextJS 14. Always use Next.js app router parameters to fetch data using Next.js SSR features and let Next.js hydrate the React view. Do not use 'use client' to fetch data and set state, as this can cause issues with refreshing your application's view state, and that component won't be hydrated by the Next.js app router. Instead, use 'use client' when you need to use Web APIs like the camera. NEVER use 'use client' to do things the way you typically would in a React app with Vite, as it defeats the purpose of using Next.js. When you 'use client', make sure it is within small components like a button or icons. Refer to the Data Fetching, Rendering, and Routing guides for more information.

MONOREPO APPS for additional information

Faucet (/apps/faucet)
The Faucet application serves as a utility for distributing test tokens or currencies in a blockchain network. It is typically used in test environments to provide developers and users with a means to obtain tokens for testing purposes.

Indexer (/apps/indexer)
The Indexer application is responsible for indexing blockchain data. It listens to the blockchain network, extracts relevant data from blocks, transactions, and events, and stores it in a structured format for easy querying and analysis.

Supabase (/apps/supabase)
This application integrates with Supabase, a scalable and open-source Firebase alternative, providing real-time database functionality, authentication, storage, and more. It's designed to leverage Supabase services for backend functionalities.

For more database schema details, refer to the Database Schema diagram.

Webapp (/apps/webapp)
The Webapp is a front-end application that provides a user interface for interacting with the project's services. It includes features such as displaying blockchain data, interacting with smart contracts, and utilizing the Faucet for test tokens.
- Use descriptive variable names with auxiliary verbs (e.g., isLoading).
- Use lowercase with dashes for directories (e.g., components/auth-wizard).
- Favor named exports for components.
- Use the Receive an Object, Return an Object (RORO) pattern.

JavaScript/TypeScript:
- Use "function" keyword for pure functions. Omit semicolons.
- Use TypeScript for all code. Prefer interfaces over types. Avoid enums, use maps.
- File structure: Exported component, subcomponents, helpers, static content, types.
- Avoid unnecessary curly braces in conditional statements.
- For single-line statements in conditionals, omit curly braces.
- Use concise, one-line syntax for simple conditional statements (e.g., if (condition) doSomething()).
- Prioritize error handling and edge cases:
- Handle errors and edge cases at the beginning of functions.
- Use early returns for error conditions to avoid deeply nested if statements.
- Place the happy path last in the function for improved readability.
- Avoid unnecessary else statements; use if-return pattern instead.
- Use guard clauses to handle preconditions and invalid states early.
- Implement proper error logging and user-friendly error messages.
- Consider using custom error types or error factories for consistent error handling.

Dependencies:
- Next.js 14 App Router
- Wagmi v2
- Viem v2

React/Next.js:
- Use functional components and TypeScript interfaces.
- Use declarative JSX.
- Use function, not const, for components.
- Use Shadcn UI, Radix, and Tailwind Aria for components and styling.
- Implement responsive design with Tailwind CSS.
- Use mobile-first approach for responsive design.
- Place static content and interfaces at file end.
- Use content variables for static content outside render functions.
- Minimize 'use client', 'useEffect', and 'setState'. Favor RSC.
- Use Zod for form validation.
- Wrap client components in Suspense with fallback.
- Use dynamic loading for non-critical components.
- Optimize images: WebP format, size data, lazy loading.
- Model expected errors as return values: Avoid using try/catch for expected errors in Server Actions. Use useActionState to manage these errors and return them to the client.
- Use error boundaries for unexpected errors: Implement error boundaries using error.tsx and global-error.tsx files to handle unexpected errors and provide a fallback UI.
- Use useActionState with react-hook-form for form validation.
- Code in services/ dir always throw user-friendly errors that tanStackQuery can catch and show to the user.
- Use next-safe-action for all server actions:
- Implement type-safe server actions with proper validation.
- Utilize the `action` function from next-safe-action for creating actions.
- Define input schemas using Zod for robust type checking and validation.
- Handle errors gracefully and return appropriate responses.
- Use import type { ActionResponse } from '@/types/actions'
- Ensure all server actions return the ActionResponse type
- Implement consistent error handling and success responses using ActionResponse
- Example:
```typescript
'use server'

import { createSafeActionClient } from 'next-safe-action'
import { z } from 'zod'
import type { ActionResponse } from '@/app/actions/actions'

const schema = z.object({
value: z.string()
})

export const someAction = createSafeActionClient()
.schema(schema)
.action(async (input): Promise<ActionResponse> => {
try {
// Action logic here
return { success: true, data: /* result */ }
} catch (error) {
return { success: false, error: error instanceof AppError ? error : appErrors.UNEXPECTED_ERROR, }
}
})
```


Key Conventions:
1. Rely on Next.js App Router for state changes.
2. Prioritize Web Vitals (LCP, CLS, FID).
3. Minimize 'use client' usage:
- Prefer server components and Next.js SSR features.
- Use 'use client' only for Web API access in small components.
- Avoid using 'use client' for data fetching or state management.

Refer to Next.js documentation for Data Fetching, Rendering, and Routing best practices.
9 changes: 0 additions & 9 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/lighthouse/budget.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
}
]
}
]
]
19 changes: 0 additions & 19 deletions .github/workflows/lint.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

__dev
# dependencies
node_modules
.pnp
Expand Down
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit"
}
}
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,9 @@ Please refer to the [webapp README.md](/apps/webapp/README.md) for more details

### Packages

#### Config ESLint (`/packages/config-eslint`)

This package provides a shared ESLint configuration to ensure consistent coding styles and practices across the project's JavaScript and TypeScript codebases.

#### Config TypeScript (`/packages/config-typescript`)

Similar to `config-eslint`, this package offers a shared TypeScript configuration to standardize TypeScript compilation options across the project.
This package offers a shared TypeScript configuration to standardize TypeScript compilation options across the project.

#### Smartsale Contracts (`/packages/app-contracts`)

Expand Down
Loading

0 comments on commit 7e1c9ad

Please sign in to comment.