Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sayedtahsin/express-mongo-supabase
Server-side code for Task App project build with Express, TS, MongoDB, Supabase
https://github.com/sayedtahsin/express-mongo-supabase
express mongodb node-corn supabase typescript
Last synced: about 1 month ago
JSON representation
Server-side code for Task App project build with Express, TS, MongoDB, Supabase
- Host: GitHub
- URL: https://github.com/sayedtahsin/express-mongo-supabase
- Owner: SayedTahsin
- Created: 2024-09-06T14:26:34.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-11-14T17:30:04.000Z (about 2 months ago)
- Last Synced: 2024-11-14T18:27:14.943Z (about 2 months ago)
- Topics: express, mongodb, node-corn, supabase, typescript
- Language: TypeScript
- Homepage: https://task-app-backend-production-1432.up.railway.app/
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Routine App Backend
## Overview
This is the server-side code for The Routine App. Build with Express.js, Typescript, MongoDB & Supabase.
Deployed in Railway : https://task-app-backend-production-1432.up.railway.app/Same project build with Hono.js on Bun Enviromnet & Used MongoDB
Same project build with Hono.js on Cloudflare-wrokers Enviromnet & Used D1 Sqlite Database*** Decided to re-write the project Using Hono & Bun as I couldn't find any good free hosting site for express server
## Features
- Manage task with four categories: Daily(resets everynight), Weekly(resets on every Sunday night), Monthly (resets on last night of the month) & General that never resets.
- Take notes and manage them with different tags.
- Manage Profile with Authentication & Authorization.## Technology Used
- **Express.js** with TypeScript
- **MongoDB** NoSQL Database for task and note storage
- **Supabase** SQL Database for user profiles & Authentication
- **node-cron** for task scheduling
- **JWT** for cookie based session manage## API Endpoints
### User Endpoints (`/api/user`)
| Method | Endpoint | Body | Protected |
|--------|-------------------------|---------------------------------------|-----------|
| POST | /signup | `{ email, password, name, weekday }` | No |
| POST | /login | `{ email, password }` | No |
| POST | /reset | `{ email }` | No |
| GET | /:email | `-` | Yes |
| POST | /logout | `-` | Yes |
| PUT | /update/:email | `{ name, weekday }` | Yes |
| DELETE | /delete/:email | `-` | Yes |### Task Endpoints (`/api/tasks`)
| Method | Endpoint | Body | Protected |
|--------|-------------------------|---------------------------------------|-----------|
| POST | / | `{ text, status, mail, type }` | Yes |
| GET | /:mail | `-` | Yes |
| PUT | /:id | `{ text, status }` | Yes |
| DELETE | /:id | `-` | Yes |### Note Endpoints (`/api/notes`)
| Method | Endpoint | Body | Protected |
|--------|-------------------------|---------------------------------------|-----------|
| POST | / | `{ text, mail }` | Yes |
| GET | /:mail | `-` | Yes |
| PUT | /:id | `{ text }` | Yes |
| DELETE | /:id | `-` | Yes |## Running Locally
1. Clone the repository:
```bash
git clone https://github.com/SayedTahsin/Task-App-Backend.git
cd Task-App-Backend
```
2. setup .env file
```bash
MONGO_URL=
PORT=8000
SUPABASE_URL=
SUPABASE_KEY=
JWT_SECRET=
```
3. Install dependecies & Run the Dev server
```bash
npm install & npm run dev
```