Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code revamp #20

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5062741
feat: Nextjs Frontend Initialized
hardworking-toptal-dev Dec 11, 2024
36cfe21
fix(frontend): Theme Bug
hardworking-toptal-dev Dec 11, 2024
2596e2a
feat(frontend): Link Fiex, Added Shadcn and Theme
hardworking-toptal-dev Dec 11, 2024
e65a03f
feat(frontend): Adding Error,Info to the Console and UI Improvement
hardworking-toptal-dev Dec 11, 2024
d301791
fix(frontend): Error Output and Scroll to the Bottom
hardworking-toptal-dev Dec 11, 2024
9878bbc
fix(frontend): Simplify Scrolling
hardworking-toptal-dev Dec 11, 2024
243bb2d
feat(frontend): IDE Layout
hardworking-toptal-dev Dec 13, 2024
f771900
feat(frontend): Settings And Theme Toggle
hardworking-toptal-dev Dec 13, 2024
e98e375
fix(frontend): Allow Png Images in Git Tracking
hardworking-toptal-dev Dec 13, 2024
6dc2762
feat: Editor Service
hardworking-toptal-dev Dec 23, 2024
5abb302
feat: Monaco Editor
hardworking-toptal-dev Dec 23, 2024
265e804
feat: File Explorer
hardworking-toptal-dev Dec 23, 2024
f532453
feat: Lanugage Server with Editor Layout
hardworking-toptal-dev Dec 23, 2024
17de97d
feat(frontend): Explorer Updated and Build System
hardworking-toptal-dev Dec 26, 2024
fa1fdcd
feat(frontend): Monaco Converter
hardworking-toptal-dev Dec 26, 2024
62d81ea
feat(frontend): Added Frotnend To Cargo Build
hardworking-toptal-dev Dec 26, 2024
2d3e02d
feat(frontend): File Content State Management
hardworking-toptal-dev Dec 27, 2024
859edf1
fix(frontend): File Explorer Type Issue
hardworking-toptal-dev Dec 27, 2024
811a12e
feat(frontend): Functional FileSystem
hardworking-toptal-dev Dec 30, 2024
c725a6a
feat(frontend): File Explorer Tabs Improved
hardworking-toptal-dev Dec 30, 2024
e33d2d1
feat(frontend): Change Log Store
hardworking-toptal-dev Dec 30, 2024
c4b742c
feat(frontend): Drag and Drop Files From System to Into Explorer
hardworking-toptal-dev Dec 30, 2024
0472222
fix(frontend): Type Issue with Language Server Protocol Version
hardworking-toptal-dev Dec 30, 2024
d864c26
fix(build): Added Missing Release Tag
hardworking-toptal-dev Dec 30, 2024
cbde576
feat(frontend): Google Drive Integration for Saving Project
hardworking-toptal-dev Jan 10, 2025
1da716f
feat(frontend): User Preferences and Autosuggestion
hardworking-toptal-dev Jan 10, 2025
7108674
feat(frontend): Backup Loading Indicator
hardworking-toptal-dev Jan 10, 2025
b13d9cb
feat(frontend): Home Page and Tab
hardworking-toptal-dev Jan 10, 2025
b8f279b
feat(frontend): Add Input Component
hardworking-toptal-dev Jan 11, 2025
6237029
feat(frontend): Remove ui/index.ts
hardworking-toptal-dev Jan 12, 2025
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
2 changes: 0 additions & 2 deletions .cargo/config

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ flycheck_*.el
*.webp

# Portable Network Graphics
*.png
# *.png

# Animated Portable Network Graphics
*.apng
Expand Down
33 changes: 28 additions & 5 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,18 @@ script = '''
npm run build --workspace=packages/app
'''

[tasks.build-frontend]
script = '''
npm run build --workspace=packages/frontend
'''

[tasks.build-backend]
script = '''
cargo build -p backend --release
'''

[tasks.build]
dependencies = ["build-server", "build-bindings", "build-app", "build-backend"]
dependencies = ["build-server", "build-bindings", "build-app","build-frontend", "build-backend"]

[tasks.clean-server]
script = '''
Expand All @@ -60,19 +65,32 @@ rm -rf packages/app/dist
rm -rf packages/app/assets/wasm
'''

[tasks.clean-frontend]
script = '''
rm -rf packages/frontend/.next
'''

[tasks.clean]
dependencies = ["clean-server", "clean-app"]
dependencies = ["clean-server", "clean-app", "clean-frontend"]

[tasks.format]
script = '''
cargo +nightly fmt --all
'''

[tasks.run]
[tasks.run-server]
script = '''
./target/release/backend --frontend_folder packages/app/dist --port 9000
./target/release/backend --frontend_folder packages/app/dist --port 4444
'''

[tasks.run-frontend]
script = '''
npm run start --workspace=packages/frontend
'''

[tasks.run]
run_task = { name = ["run-server", "run-frontend"], parallel = true }

[tasks.test-backend]
script = '''
cargo test
Expand All @@ -83,8 +101,13 @@ script = '''
npm run test --workspace=packages/app
'''

[tasks.test-frontend]
script = '''
npm run test --workspace=packages/frontend
'''

[tasks.test]
dependencies = ["test-backend", "test-app"]
dependencies = ["test-backend", "test-app", "test-frontend"]

[tasks.docker-build]
script = '''
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"private": true,
"workspaces": [
"packages/app"
"packages/app",
"packages/frontend"
],
"scripts": {
"test": "npm run test --workspaces"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/app/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default class App {
(async () => {
const result = await compileRequest(
// FIXME: This should be configurable
{ compileUrl: "http://localhost:9000/compile" },
{ compileUrl: "http://localhost:4444/compile" },
{ source: code }
);

Expand Down
16 changes: 16 additions & 0 deletions packages/frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"rules": {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-empty-function": "off",
"prefer-const": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/ban-ts-comment": "off"
},

"extends": ["next/core-web-vitals", "next/typescript"]
}
40 changes: 40 additions & 0 deletions packages/frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions packages/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

## Getting Started

First, run the development server:

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

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

To learn more about Next.js, 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.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
21 changes: 21 additions & 0 deletions packages/frontend/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}
19 changes: 19 additions & 0 deletions packages/frontend/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
async rewrites() {
return [
{
source: "/compile",
destination: "http://localhost:4444/compile",
},
{
source: "/health",
destination: "http://localhost:4444/health",
},
];
},
};

export default nextConfig;
55 changes: 55 additions & 0 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@monaco-editor/react": "^4.6.0",
"@radix-ui/react-accordion": "^1.2.2",
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-radio-group": "^1.2.1",
"@radix-ui/react-slot": "^1.1.0",
"@statelyai/inspect": "^0.4.0",
"@xstate/store": "^2.6.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"debounce": "^2.2.0",
"immer": "^10.1.1",
"jotai": "^2.10.3",
"json-rpc-2.0": "^1.3.0",
"lodash": "^4.17.21",
"lucide-react": "^0.468.0",
"monaco-editor": "^0.52.2",
"monaco-editor-core": "^0.52.2",
"monaco-languageclient": "^1.0.1",
"nanoid": "^5.0.9",
"next": "15.0.3",
"next-auth": "^5.0.0-beta.25",
"next-themes": "^0.4.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.4.0",
"tailwind-merge": "^2.5.5",
"tailwindcss-animate": "^1.0.7",
"vscode-languageserver-protocol": "^3.17.5",
"zustand": "^5.0.2"
},
"devDependencies": {
"@types/lodash": "^4.17.13",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "15.0.3",
"postcss": "^8",
"sass": "^1.83.0",
"tailwindcss": "^3.4.1",
"typescript": "^5.7.2"
}
}
8 changes: 8 additions & 0 deletions packages/frontend/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;
2 changes: 2 additions & 0 deletions packages/frontend/src/app/api/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { handlers } from "@/lib/auth" // Referring to the auth.ts we just created
export const { GET, POST } = handlers
Binary file added packages/frontend/src/app/fonts/GeistMonoVF.woff
Binary file not shown.
Binary file added packages/frontend/src/app/fonts/GeistVF.woff
Binary file not shown.
Loading
Loading