Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
File renamed without changes
Binary file added .docs/img/expo/dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,13 @@ tsconfig.tsbuildinfo
# agents
.claude/settings.local.json
.agent/

<<<<<<< HEAD
# docs
docs/.next/
docs/.source/
docs/next-env.d.ts
=======
# exclude docs lib
!docs/lib
>>>>>>> docs
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,29 @@ The `package.json` file contains various scripts for common tasks:
- `bun test`: run unit tests with Jest.
- `bun example`: start the Metro server for the example app.

### Updating Documentation Coverage

The [`docs/data/coverage.ts`](/docs/data/coverage.ts) file tracks the implementation status of various cryptographic features. It is crucial to keep this file up-to-date so that users know what is supported.

When you implement a new feature (or partially implement it), please find the corresponding entry in `coverage.ts` and update its status.

**Status Types:**

- `'implemented'`: The feature is fully implemented and supported.
- `'missing'`: The feature is not yet implemented.
- `'partial'`: The feature is partially implemented. Please add a `note` explaining what is missing or supported.
- `'not-in-node'`: The feature is specific to this library and does not exist in the standard Node.js crypto API.

**Example:**

```typescript
{
name: 'MyNewFeature',
status: 'implemented', // or 'partial', 'missing'
note: 'Supports only specific options for now' // Optional
}
```

### Sending a pull request

> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
Expand All @@ -126,4 +149,5 @@ When you're sending a pull request:
- Verify that linters and tests are passing.
- Review the documentation to make sure it looks good.
- Follow the pull request template when opening a pull request.
- If you add a new feature or change the status of an existing one, please update `docs/data/coverage.ts` to reflect the changes.
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<a href="https://margelo.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./docs/img/banner-dark.png" />
<source media="(prefers-color-scheme: light)" srcset="./docs/img/banner-light.png" />
<img alt="react-native-quick-crypto" src="./docs/img/banner-light.png" />
<source media="(prefers-color-scheme: dark)" srcset="./.docs/img/banner-dark.png" />
<source media="(prefers-color-scheme: light)" srcset="./.docs/img/banner-light.png" />
<img alt="react-native-quick-crypto" src="./.docs/img/banner-light.png" />
</picture>
</a>

Expand Down Expand Up @@ -46,7 +46,7 @@ There is a benchmark suite in the Example app in this repo that has benchmarks o
## Installation

<h3>
React Native  <a href="#"><img src="./docs/img/react-native.png" height="15" /></a>
React Native  <a href="#"><img src="./.docs/img/react-native.png" height="15" /></a>
</h3>

```sh
Expand All @@ -55,7 +55,17 @@ cd ios && pod install
```

<h3>
Expo  <a href="#"><img src="./docs/img/expo.png" height="12" /></a>
<<<<<<< HEAD
Expo  <a href="#">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./docs/img/expo/dark.png" />
<source media="(prefers-color-scheme: light)" srcset="./docs/img/expo/light.png" />
<img alt="Expo" src="./docs/img/expo/light.png" height="12" />
</picture>
</a>
=======
Expo  <a href="#"><img src="./.docs/img/expo.png" height="12" /></a>
>>>>>>> docs
</h3>

```sh
Expand Down Expand Up @@ -153,6 +163,10 @@ Not all cryptographic algorithms are supported yet. See the [implementation cove

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

For more detailed guides, check out our documentation website:
- [Contributing Guide]([prod-docs]/docs/guides/contributing)
- [Writing Documentation]([prod-docs]/docs/guides/writing-documentation)

## License

- react-native-quick-crypto is licensed under MIT.
Expand Down
1 change: 0 additions & 1 deletion bun.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"lockfileVersion": 1,
"configVersion": 0,
"workspaces": {
"": {
"dependencies": {
Expand Down
26 changes: 26 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# deps
/node_modules

# generated content
.source

# test & build
/coverage
/.next/
/out/
/build
*.tsbuildinfo

# misc
.DS_Store
*.pem
/.pnp
.pnp.js
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# others
.env*.local
.vercel
next-env.d.ts
45 changes: 45 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# docs

This is a Next.js application generated with
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).

Run development server:

```bash
npm run dev
# or
pnpm dev
# or
yarn dev
```

Open http://localhost:3000 with your browser to see the result.

## Explore

In the project, you can see:

- `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
- `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep.

| Route | Description |
| ------------------------- | ------------------------------------------------------ |
| `app/(home)` | The route group for your landing page and other pages. |
| `app/docs` | The documentation layout and pages. |
| `app/api/search/route.ts` | The Route Handler for search. |

### Fumadocs MDX

A `source.config.ts` config file has been included, you can customise different options like frontmatter schema.

Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details.

## Learn More

To learn more about Next.js and Fumadocs, 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.
- [Fumadocs](https://fumadocs.dev) - learn about Fumadocs
6 changes: 6 additions & 0 deletions docs/app/(home)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { HomeLayout } from 'fumadocs-ui/layouts/home';
import { baseOptions } from '@/lib/layout.shared';

export default function Layout({ children }: LayoutProps<'/'>) {
return <HomeLayout {...baseOptions()}>{children}</HomeLayout>;
}
14 changes: 14 additions & 0 deletions docs/app/(home)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

import { Hero } from '../../components/landing/Hero';
import { FeatureSection } from '../../components/landing/FeatureSection';

export default function HomePage() {
return (

<div className="flex flex-col min-h-screen bg-fd-background">
<Hero />
<FeatureSection />
</div>

);
}
31 changes: 31 additions & 0 deletions docs/app/api/contributors/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { NextResponse } from 'next/server';

export const revalidate = 86400; // Cache response for 24 hours (Maximum rate-limit friendliness)

export async function GET() {
try {
console.log('[API] Fetching contributors from GitHub...');
const headers: Record<string, string> = process.env.GITHUB_TOKEN ? { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` } : {};

const res = await fetch('https://api.github.com/repos/margelo/react-native-quick-crypto/contributors?per_page=100', {
headers,
next: { revalidate: 86400 }
});

if (!res.ok) {
console.error('[API] GitHub Contributors fetch failed:', res.status, res.statusText);
throw new Error(`GitHub API Error: ${res.status} ${res.statusText}`);
}

const data = await res.json();

if (!Array.isArray(data)) return NextResponse.json([]);

const humans = data.filter((c: any) => !c.login.toLowerCase().includes('[bot]'));

return NextResponse.json(humans);
} catch (error) {
console.error('[API] Handler error:', error);
return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
}
}
Loading