Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mariussde/ecommerce-api
Nest js api with supabase db for a Next js frontend
https://github.com/mariussde/ecommerce-api
nestjs nodejs supabase
Last synced: 10 days ago
JSON representation
Nest js api with supabase db for a Next js frontend
- Host: GitHub
- URL: https://github.com/mariussde/ecommerce-api
- Owner: mariussde
- Created: 2024-11-08T08:53:43.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-12-18T15:07:45.000Z (about 1 month ago)
- Last Synced: 2024-12-18T16:19:36.920Z (about 1 month ago)
- Topics: nestjs, nodejs, supabase
- Language: TypeScript
- Homepage: https://ecommerce-api-0pi3.onrender.com/
- Size: 138 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
A progressive Node.js framework for building efficient and scalable server-side applications.
## Description
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository with Supabase integration for an e-commerce API.\
\
Please keep in mind the api is hosted in a free tier plan so after 15 minutes of inactivity it'll shutdown and **wake up time is around 50 seconds**.## Project Setup
1. Install dependencies:
```bash
$ npm install
```2. Set up Supabase:
- Create a new project at [Supabase](https://supabase.com)
- Go to Project Settings > API
- Copy the Project URL and anon/public API key
- Create a `.env` file in the root directory with:
```
SUPABASE_URL=your-project-url
SUPABASE_KEY=your-anon-key
```3. Initialize the database:
- Go to Supabase SQL Editor
- Copy the contents of `init.sql` from the project root
- Run the SQL commands to create and populate the database tables## API Documentation
The project includes a Postman collection (`api-calls.json`) with example requests for all endpoints. Import this file into Postman to test the API.
## Running the Project
```bash
# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod
```## Test
```bash
# unit tests
$ npm run test# e2e tests
$ npm run test:e2e# test coverage
$ npm run test:cov
```## License
Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).