Skip to content

Commit 0a99633

Browse files
ABCrimsonclaude
andcommitted
docs: complete repository overhaul with modern README, wiki setup, and v1.0.0
- Rewrite README.md with SVG banner, Shields.io badges, Mermaid architecture diagram, collapsible project structure, and tech stack table - Add LICENSE (MIT), CONTRIBUTING.md, CODE_OF_CONDUCT.md - Add GitHub issue templates (bug report, feature request) and PR template - Update all 9 existing markdown files with accurate current references - Fix stale Prisma commands (--filter web -> --filter @nextcalc/database) - Fix stale domain references (yourdomain.com/nextcalc.pro -> nextcalc.io) - Replace ASCII diagrams with Mermaid in ARCHITECTURE.md - Add i18n architecture section and deployment methods summary - Bump version from 0.1.0 to 1.0.0 for production release Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0aabc48 commit 0a99633

19 files changed

Lines changed: 922 additions & 213 deletions
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for reporting a bug! Please fill out the form below.
10+
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Description
15+
description: A clear description of the bug.
16+
placeholder: What happened?
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: steps
22+
attributes:
23+
label: Steps to Reproduce
24+
description: How can we reproduce this?
25+
placeholder: |
26+
1. Go to '...'
27+
2. Click on '...'
28+
3. See error
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: expected
34+
attributes:
35+
label: Expected Behavior
36+
description: What should have happened instead?
37+
validations:
38+
required: true
39+
40+
- type: textarea
41+
id: screenshots
42+
attributes:
43+
label: Screenshots
44+
description: If applicable, add screenshots to help explain your problem.
45+
46+
- type: dropdown
47+
id: browser
48+
attributes:
49+
label: Browser
50+
options:
51+
- Chrome
52+
- Firefox
53+
- Safari
54+
- Edge
55+
- Other
56+
57+
- type: input
58+
id: os
59+
attributes:
60+
label: Operating System
61+
placeholder: e.g., Windows 11, macOS 15, Ubuntu 24
62+
63+
- type: textarea
64+
id: additional
65+
attributes:
66+
label: Additional Context
67+
description: Any other information that might help.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Wiki & Documentation
4+
url: https://github.com/ABCrimson/NextCalc/wiki
5+
about: Check the wiki for guides, API reference, and common questions.
6+
- name: Live Demo
7+
url: https://nextcalc.io
8+
about: Try NextCalc Pro at nextcalc.io
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Have an idea for NextCalc Pro? We'd love to hear it!
10+
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Problem
15+
description: What problem does this feature solve? Is it related to a frustration?
16+
placeholder: I'm always frustrated when...
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Proposed Solution
24+
description: Describe the solution you'd like.
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
id: alternatives
30+
attributes:
31+
label: Alternatives Considered
32+
description: Have you considered any alternative approaches?
33+
34+
- type: dropdown
35+
id: area
36+
attributes:
37+
label: Area
38+
options:
39+
- Calculator
40+
- Plotting / Visualization
41+
- Math Engine
42+
- Algorithms
43+
- GraphQL API
44+
- Cloudflare Workers
45+
- UI / Design
46+
- Documentation
47+
- Other
48+
49+
- type: textarea
50+
id: additional
51+
attributes:
52+
label: Additional Context
53+
description: Screenshots, mockups, or any other relevant context.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Summary
2+
3+
<!-- Brief description of what this PR does and why -->
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix (non-breaking change that fixes an issue)
8+
- [ ] New feature (non-breaking change that adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
- [ ] Refactoring (no functional changes)
12+
- [ ] CI/CD or infrastructure
13+
14+
## Changes
15+
16+
<!-- List the key changes made in this PR -->
17+
18+
-
19+
20+
## Testing
21+
22+
- [ ] `pnpm build` passes
23+
- [ ] `pnpm test` passes
24+
- [ ] `pnpm lint` passes
25+
- [ ] `pnpm typecheck` passes
26+
- [ ] Manual testing completed
27+
28+
## Screenshots
29+
30+
<!-- If this is a UI change, add before/after screenshots -->
31+
32+
## Related Issues
33+
34+
<!-- Link any related issues: Closes #123, Fixes #456 -->

ARCHITECTURE.md

Lines changed: 74 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,35 @@
22

33
## High-Level Architecture
44

5-
```
6-
+-----------------------+
7-
| Browser Client |
8-
| (Next.js 16 + React) |
9-
+----------+------------+
10-
|
11-
+--------------+--------------+
12-
| | |
13-
+----v----+ +-----v-----+ +-----v-----+
14-
| Vercel | | Cloudflare | | Cloudflare |
15-
| Next.js | | Workers | | Workers |
16-
| App | | (CAS, | | (Rate |
17-
| + API | | Export) | | Limiter) |
18-
+----+-----+ +-----+------+ +-----+------+
19-
| | |
20-
+----v-----+ +----v----+ +----v----+
21-
| Neon | | R2 | | KV |
22-
| PostgreSQL| | Bucket | | Store |
23-
+----+------+ +---------+ +---------+
24-
|
25-
+----v------+
26-
| Upstash |
27-
| Redis |
28-
+-----------+
5+
```mermaid
6+
graph TB
7+
subgraph Client["Browser Client"]
8+
A["Next.js 16 + React 19.3"]
9+
end
10+
subgraph Vercel["Vercel Edge Network"]
11+
B["App Router + SSR"]
12+
C["GraphQL API (Apollo 5.4)"]
13+
end
14+
subgraph CF["Cloudflare Workers"]
15+
D["CAS Service"]
16+
E["Export Service"]
17+
F["Rate Limiter"]
18+
end
19+
subgraph Storage
20+
G[("Neon PostgreSQL")]
21+
H[("Upstash Redis")]
22+
I[("R2 Bucket")]
23+
J[("KV Store")]
24+
end
25+
A --> B
26+
A --> D
27+
A --> E
28+
B --> C
29+
C --> G
30+
C --> H
31+
D --> F
32+
E --> I
33+
F --> J
2934
```
3035

3136
## Package Dependency Graph
@@ -149,50 +154,40 @@ Three edge microservices deployed to Cloudflare's global network:
149154

150155
### Client-Side Calculation
151156

152-
```
153-
User Input -> Calculator Component -> Math Engine (client-side)
154-
|
155-
v
156-
Display Result
157-
|
158-
v
159-
Save to History (Zustand store)
160-
|
161-
v (if authenticated)
162-
GraphQL Mutation -> Prisma -> Neon PostgreSQL
157+
```mermaid
158+
flowchart LR
159+
A[User Input] --> B[Calculator Component]
160+
B --> C[Math Engine]
161+
C --> D[Display Result]
162+
D --> E[Zustand History]
163+
E -->|if authenticated| F[GraphQL Mutation]
164+
F --> G[Prisma]
165+
G --> H[(Neon PostgreSQL)]
163166
```
164167

165168
### Server-Side (GraphQL)
166169

167-
```
168-
Apollo Client -> Next.js API Route (/api/graphql)
169-
|
170-
v
171-
Apollo Server
172-
|
173-
v
174-
Auth Check (NextAuth session)
175-
|
176-
v
177-
DataLoaders (batch + cache)
178-
|
179-
v
180-
Prisma Client -> Neon PostgreSQL
170+
```mermaid
171+
flowchart TD
172+
A[Apollo Client] --> B["API Route (/api/graphql)"]
173+
B --> C[Apollo Server]
174+
C --> D[Auth Check]
175+
D --> E[DataLoaders]
176+
E --> F[Prisma Client]
177+
F --> G[(Neon PostgreSQL)]
181178
```
182179

183180
### Edge Worker Flow
184181

185-
```
186-
Client -> Cloudflare Worker (global edge)
187-
|
188-
v
189-
Rate Limit Check (KV)
190-
|
191-
v
192-
Process Request (CAS / Export)
193-
|
194-
v (if export)
195-
Store to R2 -> Return URL
182+
```mermaid
183+
flowchart TD
184+
A[Client] --> B[Cloudflare Worker]
185+
B --> C{Rate Limit Check}
186+
C -->|Allowed| D[Process Request]
187+
D -->|CAS| E[Return Result]
188+
D -->|Export| F[Store to R2]
189+
F --> G[Return URL]
190+
C -->|Denied| H[429 Too Many Requests]
196191
```
197192

198193
## Authentication Flow
@@ -275,18 +270,32 @@ export const useStore = create<State>()(
275270

276271
| Pattern | Purpose |
277272
|---------|---------|
278-
| `app/**/page.tsx` | Route pages |
279-
| `app/**/layout.tsx` | Layouts |
280-
| `app/**/loading.tsx` | Loading UI (Suspense) |
281-
| `app/**/error.tsx` | Error boundary |
282-
| `app/**/not-found.tsx` | 404 page |
273+
| `app/[locale]/**/page.tsx` | Route pages (i18n) |
274+
| `app/[locale]/**/layout.tsx` | Layouts |
275+
| `app/[locale]/**/loading.tsx` | Loading UI (Suspense) |
276+
| `app/[locale]/**/error.tsx` | Error boundary |
277+
| `app/[locale]/**/not-found.tsx` | 404 page |
283278
| `components/ui/*.tsx` | shadcn/ui components |
284279
| `components/calculator/*.tsx` | Calculator feature components |
285280
| `components/plots/*.tsx` | Plot visualization components |
286281
| `lib/stores/*.ts` | Zustand stores |
287282
| `lib/hooks/*.ts` | Custom React hooks |
288283
| `lib/workers/*.ts` | Web Worker scripts |
289284

285+
## Internationalization (i18n)
286+
287+
- **Library:** `next-intl` with App Router integration
288+
- **Locales:** en, ru, es, uk, de, fr, ja, zh (8 languages)
289+
- **Translation files:** `apps/web/messages/{locale}.json` (1200+ keys per locale)
290+
- **Routing:** `[locale]` dynamic segment (e.g., `/en/plot`, `/ru/matrix`)
291+
- **Middleware:** Locale detection + redirect in `apps/web/middleware.ts`
292+
293+
### Adding a Language
294+
295+
1. Create `apps/web/messages/{code}.json` (copy from `en.json`)
296+
2. Add locale to `apps/web/i18n/config.ts`
297+
3. Translate all keys
298+
290299
## Performance Targets
291300

292301
| Metric | Target |

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes to NextCalc Pro are documented in this file.
44

5-
## [Unreleased]
5+
## [1.0.0] - 2026-02-28
66

77
### 2026-02-24
88

@@ -65,3 +65,6 @@ All notable changes to NextCalc Pro are documented in this file.
6565
---
6666

6767
_This changelog is generated from the git history. Commit hashes reference the short SHA for each change._
68+
69+
[1.0.0]: https://github.com/ABCrimson/NextCalc/releases/tag/v1.0.0
70+
[0.1.0]: https://github.com/ABCrimson/NextCalc/releases/tag/v0.1.0

CODE_OF_CONDUCT.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We are committed to making participation in this project a welcoming and respectful experience for everyone, regardless of background or identity.
6+
7+
## Our Standards
8+
9+
**Positive behaviors include:**
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
16+
17+
**Unacceptable behaviors include:**
18+
19+
- Trolling, insults, or derogatory comments
20+
- Personal or political attacks
21+
- Publishing others' private information without permission
22+
- Any conduct which could reasonably be considered inappropriate in a professional setting
23+
24+
## Enforcement
25+
26+
Project maintainers are responsible for clarifying the standards of acceptable behavior and will take appropriate corrective action in response to any instances of unacceptable behavior.
27+
28+
## Scope
29+
30+
This Code of Conduct applies within all project spaces and when an individual is representing the project in public spaces.
31+
32+
## Attribution
33+
34+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.

0 commit comments

Comments
 (0)