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

Feat/frontend crud #1

Merged
merged 14 commits into from
Dec 18, 2024
53 changes: 30 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
# pathfinding
# 🗺️ pathfinding

🗺️ visualize pathfinding on custom mazes | made with sveltekit 💼
A **CRUD** application made with _SvelteKit_ for visualizing the \*A\*\* algorithm on customizable mazes. Originally made for our CS116 Project.

# create-svelte
## Setup

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
### Installation

## Creating a project
Install the latest _NodeJS_ LTS version from the [official website](https://nodejs.org/en) or through Node Version Manager: [`nvm` for Linux](https://github.com/nvm-sh/nvm), and [`nvm-win` for Windows](https://github.com/coreybutler/nvm-windows).

If you're seeing this, you've probably already done this step. Congrats!
Afterwards, install dependencies (preferably `pnpm`) with the following commands:

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app
```
npm install -g pnpm
pnpm install
```

## Developing
### Docker (for development)

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
_Docker Compose_ is used to run necessary third-party services such as _PostgreSQL_ for development. Install _Docker Desktop_ from the [offical website](https://docs.docker.com/desktop/) to start.

```bash
npm run dev
# start containers
docker-compose up -d

# or start the server and open the app in a new browser tab
npm run dev -- --open
# stop containers
docker-compose stop

# delete containers (--volumes is optional if you also want to remove data volumes)
docker-compose down --volumes
```

## Building
## Development

To create a production version of your app:
### Database Migration

```bash
npm run build
The project lacks a Database Migration Framework for automatically syncing schemas. In order to setup the database schema for this project, a simple script can be used instead whicn can be executed with the following command.

```
pnpm vite-node "./src/lib/server/migrations/migrate"
```

You can preview the production build with `npm run preview`.
### Development Server

Start the development server with the following command.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
```
pnpm run dev
```
61 changes: 36 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "geoplot",
"name": "pathfinding",
"version": "0.0.1",
"private": true,
"scripts": {
Expand All @@ -16,37 +16,48 @@
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@faker-js/faker": "^9.3.0",
"@sveltejs/adapter-auto": "^3.2.2",
"@sveltejs/kit": "^2.5.17",
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"@tailwindcss/typography": "^0.5.13",
"@types/eslint": "^8.56.10",
"autoprefixer": "^10.4.19",
"eslint": "^9.5.0",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/kit": "^2.11.1",
"@sveltejs/vite-plugin-svelte": "^5.0.2",
"@tailwindcss/typography": "^0.5.15",
"@types/eslint": "^9.6.1",
"@typescript-eslint/parser": "^8.18.0",
"autoprefixer": "^10.4.20",
"bits-ui": "^0.21.16",
"clsx": "^2.1.1",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.40.0",
"globals": "^15.6.0",
"husky": "^9.0.11",
"postcss": "^8.4.38",
"prettier": "^3.3.2",
"prettier-plugin-svelte": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.6.5",
"svelte": "^4.2.18",
"svelte-check": "^3.8.1",
"tailwindcss": "^3.4.4",
"tslib": "^2.6.3",
"typescript": "~5.4.5",
"typescript-eslint": "8.0.0-alpha.30",
"vite": "^5.3.1",
"eslint-plugin-svelte": "^2.46.1",
"espree": "^10.3.0",
"globals": "^15.13.0",
"husky": "^9.1.7",
"mode-watcher": "^0.5.0",
"postcss": "^8.4.49",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.9",
"svelte": "^5.12.0",
"svelte-check": "^4.1.1",
"svelte-eslint-parser": "^0.43.0",
"svelte-sonner": "^0.3.28",
"tailwind-merge": "^2.5.5",
"tailwind-variants": "^0.3.0",
"tailwindcss": "^3.4.16",
"tslib": "^2.8.1",
"typescript": "~5.7.2",
"typescript-eslint": "^8.18.0",
"vite": "^6.0.3",
"vite-node": "^2.1.8"
},
"type": "module",
"dependencies": {
"clsx": "^2.1.1",
"@tanstack/svelte-query": "^5.62.7",
"@types/luxon": "^3.4.2",
"dotenv": "^16.4.7",
"lucide-svelte": "^0.468.0",
"luxon": "^3.5.0",
"postgres": "^3.4.5",
"tailwind-merge": "^2.3.0",
"tailwind-variants": "^0.2.1",
"svelte-radix": "^2.0.1",
"zod": "^3.23.8"
}
}
Loading
Loading