Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/reijjo/todo-with-everything

To Do List with everything that you can imagine
https://github.com/reijjo/todo-with-everything

bun docker expressjs github-actions pgadmin4 postgresql react redux sequelize typescript

Last synced: 19 days ago
JSON representation

To Do List with everything that you can imagine

Awesome Lists containing this project

README

        

# To-do list

Just a basic to-do list

- Adding more features when feels like it

Screenshot 2024-11-22 at 12 14 34

## Run project

### .env file

Rename the `envEXAMPLE` file to `.env` in `server`, `client` and `e2e-tests` folders

- Add the missing values for your project

### Frontend

`npm run dev` in the client folder

- localhost:5173

### Backend

`npm run dev` in the server folder

- localhost:3001

### PostgreSQL & pgAdmin

`docker compose up` in the server folder

- pgAdmin at localhost:5050

## Run tests

### Frontend

`npm run test` in the client folder

### Backend (there arent any tests yet)

`npm run test` in the server folder

### e2e-tests

`npm run test` in the e2e-tests folder

## Create Project (Bun)

### Frontend

- `bun create vite client` -> `React` -> `TypeScript + SMC` -> `cd client` -> `bun install`
- Modify `package.json` file:

```json
"scripts": {
"dev": "bunx --bun vite",
"build": "vite build",
"serve": "vite preview"
},
```

- Start frontend with `bun run dev`

### Backend

- `mkdir server` -> `cd server` -> `bun init`
- Install `express` -> `bun add express` -> `bun add -d @types/express @types/bun`
- Add to servers `package.json` file:

```json
"scripts": {
"dev": "bun --watch run index.ts",
"clean": "rm -rf node_modules .bun bun.lockb dist"
},
```

- Start server with `bun run dev`

## Frontend

### React Router

- Install React Router `bun add react-router-dom`

### Icons

- Add Lucide Icons `bun add lucide-react`
- Make a `Icon` component:

```tsx
import { Suspense, lazy } from "react";

import { LucideProps } from "lucide-react";
import dynamicIconImports from "lucide-react/dynamicIconImports";

const fallback =

;

interface IconProps extends Omit {
name: keyof typeof dynamicIconImports;
}

export const Icon = ({ name, ...props }: IconProps) => {
const LucideIcon = lazy(dynamicIconImports[name]);

return (



);
};
```

- And use it in code like this:

```tsx

```

## Backend