Skip to content

Commit cc055a5

Browse files
authored
feat(deps): migrate project to Next.js and update project structure (#51)
* Update dependencies, add TypeScript support, and remove unused files - Updated various dependencies in package.json and package-lock.json to their latest versions, including React, DnD Kit, FontAwesome, and others. - Introduced TypeScript support by adding tsconfig.json and type declarations for SVG and PNG files. - Removed the reportWebVitals.js file and its references from index.js to streamline the application. - Cleaned up devDependencies and ensured compatibility with the latest libraries. * Update package dependencies: remove web-vitals, add @types/file-saver * Refactor components and add TypeScript support - Removed legacy JavaScript files and replaced them with TypeScript versions for improved type safety and maintainability. - Cleaned up unused files and optimized imports across the application. - Implemented conditional rendering for JSONPreview in development mode. * Add Character Management Components in TypeScript SHOWCASE-23 - Replaced the legacy JavaScript CharacterList and NewCharacterButton with TypeScript versions, enhancing type safety and maintainability. - Removed outdated JavaScript files to streamline the codebase and improve overall application structure. * - Converted various credential-related components to TypeScript, improving type safety and maintainability. - Updated existing components to utilize new props and state management patterns. - Cleaned up unused files and optimized imports for better performance and readability. * - Updated CredentialsScreen to utilize new helper functions for managing credentials, attributes, and proof requests. - Enhanced test coverage for credential-related functionalities in json-helper.spec.ts. - Made minor adjustments to types and imports across multiple files for consistency and clarity. * - Renamed `OnboardingScreen` to `OnboardingStep` for clarity and consistency. - Introduced new helper functions for managing onboarding steps, including adding, updating, and removing credentials. - Updated the `OnboardingPage` to handle state management and rendering of onboarding steps effectively. - Enhanced type safety by converting components to TypeScript and updating type definitions. - Cleaned up imports and optimized component structure for better maintainability. * - Added tests for new onboarding step helper functions: `updateOnboardingStep`, `isArrayProperty`, `updateOnboardingStepSingleValue`, `updateOnboardingStepCredentials`, `removeOnboardingStepCredential`, and `addOnboardingStepCredential`. * Implement core application structure with TypeScript support - Added state management using `useImmer` for handling nested JSON structures, enhancing performance and maintainability. - Updated `DEFAULT_JSON` to include a new `screenId` for onboarding steps. - Created a new `ScenarioPage` component to manage scenarios, including adding and editing steps with dynamic credential handling. - Refactored existing components to utilize updated props and state management patterns, ensuring type safety across the application. - Introduced new helper functions for updating JSON properties and managing state transitions effectively. * Migrate project to Next.js and update project structure - Converted project from Create React App to Next.js 14 with TypeScript - Restructured project files and directories to follow Next.js conventions - Added new configuration files: tailwind.config.ts, tsconfig.json - Implemented theme provider and dark mode toggle - Created UI components using shadcn/ui pattern - Removed legacy React and src folder files - Updated dependencies and added Next.js specific configurations * Add Jest configuration and testing setup - Added jest.config.ts for configuring Jest with Next.js - Updated package.json with test scripts and testing library dependencies - Implemented comprehensive test suite for json-helper functions * Refactor Credentials - Migrated credentials and onboarding pages to use modern React hooks and state management - Introduced new `useCredentials` hook for managing credential state - Updated components to use Radix UI and shadcn/ui components - Simplified page layouts with two-column design - Added Zod schema validation for credential form - Removed legacy components and consolidated file structure * Add Language Selector and Radix UI Components - Introduced a new LanguageSelector component with language switching functionality - Added Radix UI Dialog and Popover components for enhanced UI interactions - Updated package.json with new dependencies: @radix-ui/react-dialog, @radix-ui/react-popover, and cmdk - Implemented cookie-based language preference persistence - Created reusable UI components for command palette and dialog interactions * Refactor Onboarding Screen Components - Migrated onboarding screen components to use modern React hooks and state management - Introduced new `useOnboarding` and `useIssueStep` hooks for managing onboarding state - Created Zod schemas for form validation in onboarding steps * Refactor Scenario Screen Components - Migrated scenario screen components to use modern React hooks and state management - Introduced new `useScenarios` hook for managing scenario state - Created Zod schemas for form validation in scenario steps and scenarios * Migrate project to Zustand and add test suite * Add test suite for useShowcaseStore hook * Update .gitignore to exclude .swc directory
1 parent ee09575 commit cc055a5

File tree

148 files changed

+26617
-30000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+26617
-30000
lines changed

.gitignore

Lines changed: 24 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -1,153 +1,42 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
.pnpm-debug.log*
9-
10-
# Diagnostic reports (https://nodejs.org/api/report.html)
11-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12-
13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
18-
19-
# Directory for instrumented libs generated by jscoverage/JSCover
20-
lib-cov
21-
22-
# Coverage directory used by tools like istanbul
23-
coverage
24-
*.lcov
25-
26-
# nyc test coverage
27-
.nyc_output
28-
29-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30-
.grunt
31-
32-
# Bower dependency directory (https://bower.io/)
33-
bower_components
34-
35-
# node-waf configuration
36-
.lock-wscript
37-
38-
# Compiled binary addons (https://nodejs.org/api/addons.html)
39-
build/Release
40-
41-
# Dependency directories
42-
node_modules/
43-
jspm_packages/
44-
45-
# Snowpack dependency directory (https://snowpack.dev/)
46-
web_modules/
47-
48-
# TypeScript cache
49-
*.tsbuildinfo
50-
51-
# Optional npm cache directory
52-
.npm
53-
54-
# Optional eslint cache
55-
.eslintcache
56-
57-
# Optional stylelint cache
58-
.stylelintcache
59-
60-
# Microbundle cache
61-
.rpt2_cache/
62-
.rts2_cache_cjs/
63-
.rts2_cache_es/
64-
.rts2_cache_umd/
65-
66-
# Optional REPL history
67-
.node_repl_history
68-
69-
# Output of 'npm pack'
70-
*.tgz
71-
72-
# Yarn Integrity file
73-
.yarn-integrity
74-
75-
# dotenv environment variable files
76-
.env
77-
.env.development.local
78-
.env.test.local
79-
.env.production.local
80-
.env.local
81-
82-
# parcel-bundler cache (https://parceljs.org/)
83-
.cache
84-
.parcel-cache
85-
86-
# Next.js build output
87-
.next
88-
out
89-
90-
# Nuxt.js build / generate output
91-
.nuxt
92-
dist
93-
94-
# Gatsby files
95-
.cache/
96-
# Comment in the public line in if your project uses Gatsby and not Next.js
97-
# https://nextjs.org/blog/next-9-1#public-directory-support
98-
# public
99-
100-
# vuepress build output
101-
.vuepress/dist
102-
103-
# vuepress v2.x temp and cache directory
104-
.temp
105-
.cache
106-
107-
# Docusaurus cache and generated files
108-
.docusaurus
109-
110-
# Serverless directories
111-
.serverless/
112-
113-
# FuseBox cache
114-
.fusebox/
115-
116-
# DynamoDB Local files
117-
.dynamodb/
118-
119-
# TernJS port file
120-
.tern-port
121-
122-
# Stores VSCode versions used for testing VSCode extensions
123-
.vscode-test
124-
125-
# yarn v2
126-
.yarn/cache
127-
.yarn/unplugged
128-
.yarn/build-state.yml
129-
.yarn/install-state.gz
130-
.pnp.*
1311
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
1322

1333
# dependencies
1344
/node_modules
1355
/.pnp
136-
.pnp.js
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
13712

13813
# testing
13914
/coverage
14015

16+
# next.js
17+
/.next/
18+
/out/
19+
/.swc
20+
14121
# production
14222
/build
14323

14424
# misc
14525
.DS_Store
146-
.env.local
147-
.env.development.local
148-
.env.test.local
149-
.env.production.local
26+
*.pem
15027

28+
# debug
15129
npm-debug.log*
15230
yarn-debug.log*
15331
yarn-error.log*
32+
.pnpm-debug.log*
33+
34+
# env files (can opt-in for committing if needed)
35+
.env*
36+
37+
# vercel
38+
.vercel
39+
40+
# typescript
41+
*.tsbuildinfo
42+
next-env.d.ts

app/credentials/page.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { CredentialsDisplay } from "@/components/credentials/credentials-display";
2+
import { CredentialsEditor } from "@/components/credentials/credentials-editor";
3+
4+
export default function Credentials() {
5+
return (
6+
<div className="flex flex-col min-h-screen mt-20 ">
7+
<div className="container mx-auto px-4 py-8 flex-grow">
8+
<div className="flex gap-12 h-full">
9+
<div className="w-2/5 rounded left-col text-light-text dark:text-dark-text">
10+
<div className="flex justify-between">
11+
<div>
12+
<h3 className="text-4xl font-bold text-foreground">
13+
Add your Credentials
14+
</h3>
15+
<p className="text-foreground mt-3">
16+
Fill in the details on the right to create a credential for
17+
this showcase.
18+
</p>
19+
</div>
20+
</div>
21+
<CredentialsDisplay />
22+
</div>
23+
<div className="w-3/5 p-6 rounded-md right-col bg-light-bg-secondary dark:bg-dark-bg-secondary text-light-text dark:text-dark-text ">
24+
<CredentialsEditor />
25+
</div>
26+
</div>
27+
</div>
28+
</div>
29+
);
30+
}
31+

app/favicon.ico

25.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)