Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/sg3659/cb-chat

About This is a starter project for a fullstack serverless application using Hono.js, Cloudflare Workers and Neon Postgres. It is a simple CRUD application that allows you to create, read, update and delete posts. It also has provisions for building user interface using HTML and CSS.
https://github.com/sg3659/cb-chat

cloudflare css honojs html neondb postgresql prisma typescript zod-validation

Last synced: 5 days ago
JSON representation

About This is a starter project for a fullstack serverless application using Hono.js, Cloudflare Workers and Neon Postgres. It is a simple CRUD application that allows you to create, read, update and delete posts. It also has provisions for building user interface using HTML and CSS.

Awesome Lists containing this project

README

        

## Fullstack Serverless Starter with Hono.js, Cloudflare Workers and Neon Postgres.

This is a starter project for a fullstack serverless application using Hono.js, Cloudflare Workers, and Neon Postgres. It is a simple CRUD application that allows you to create, read, update, and delete posts. It also has provisions for building user interfaces using HTML and CSS.

### Prerequisites

- Node.js and npm installed
- [Cloudflare Workers](https://workers.cloudflare.com/) account
- [Neon Postgres](https://neon.tech) account and database

### Project structure

The project structure is as follows:

```
---docs
|-- schemas.ts
---prisma
|-- schema.prisma
---public
|-- images.*png,jpg,svg
|-- favicon.ico
---src
|-- configs
|-- controllers
|-- middlewares
|-- routes
|-- validations
|-- views
|-- index.ts
---utils
|-- constants.js
---tsconfig.json
---wrangler.toml
---package.json
---package-lock.json
---README.md
```

- The docs folder contains the OpenAPI schemas for generating documentation for the application. It uses [@hono/zod-openapi](https://hono.dev/examples/zod-openapi) to generate the schemas. Only the schemas is documented in this starter.
- The prisma folder contains the database schema and migration files.
- The public folder contains the static assets for the application.
- The src folder contains the source code for the application.
- The configs folder contains the configuration files for the application. Eg: `config.ts`, `db.ts`, etc.
- The controllers folder contains the controller logic for the application.
- The middlewares folder contains the middleware logic for the application. Eg: `auth.ts`, `logger.ts`, etc.
- The queries folder contains the database query functions for the application.The controllers uses these functions to interact with the database.
- The routes folder contains the route definitions for the application.
- The validations folder contains the validation functions for the incoming requests to application.
- The views folder contains the HTML and Tailwind CSS files for the application.
- The utils folder contains the utility/helper files.
- The `tsconfig.json` file contains the TypeScript configuration for the application.
- The `wrangler.toml` file contains the configuration for the Cloudflare Workers deployment.
- The `package.json` file contains the dependencies and scripts for the application.