Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
commit 86645be
Author: BackRunner <dev@backrunner.top>
Date:   Sat Aug 31 00:20:33 2024 +0800

    chore: update roadmap

commit 6120233
Author: BackRunner <dev@backrunner.top>
Date:   Sat Aug 31 00:19:43 2024 +0800

    feat: revert token right after the approval done

commit a78c02f
Author: BackRunner <dev@backrunner.top>
Date:   Sat Aug 31 00:13:55 2024 +0800

    feat: add retry when request failed

commit 7160676
Author: BackRunner <dev@backrunner.top>
Date:   Sat Aug 31 00:05:45 2024 +0800

    feat: enhance ServiceWorker installation

commit 1fe1197
Author: BackRunner <dev@backrunner.top>
Date:   Sat Aug 31 00:05:32 2024 +0800

    feat: better size check & SSRF protection

commit 4e64c9e
Author: BackRunner <dev@backrunner.top>
Date:   Sat Aug 31 00:05:09 2024 +0800

    fix: missing property in notification list

commit 9207f91
Author: BackRunner <dev@backrunner.top>
Date:   Sat Aug 31 00:02:23 2024 +0800

    fix: wrong logged in condition

commit 72d2198
Author: BackRunner <dev@backrunner.top>
Date:   Tue Aug 27 21:32:22 2024 +0800

    feat: better heatbeat interval clean up

commit aa68e86
Author: BackRunner <dev@backrunner.top>
Date:   Tue Aug 27 02:02:43 2024 +0800

    feat: finish the logic of approval process

commit e8c2b72
Merge: 4ac3cfe fbff8e9
Author: BackRunner <dev@backrunner.top>
Date:   Mon Aug 26 23:09:54 2024 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit fbff8e9
Merge: 132ab42 4b2e6cc
Author: backrunner <dev@backrunner.top>
Date:   Mon Aug 26 15:07:10 2024 +0800

    Merge branch 'main' into dev

    # Conflicts:
    #	package.json
    #	src/components/notification/NotificationCard.vue

commit 132ab42
Merge: e54dacb e019bac
Author: backrunner <dev@backrunner.top>
Date:   Mon Aug 26 14:38:16 2024 +0800

    Merge branch 'main' into dev

    # Conflicts:
    #	package.json
    #	src/components/notification/NotificationCard.vue

commit e019bac
Author: BackRunner <dev@backrunner.top>
Date:   Mon Aug 26 01:46:23 2024 +0800

    v0.1.3

    v0.1.3

    chore: fix version

commit 4ac3cfe
Author: BackRunner <dev@backrunner.top>
Date:   Mon Aug 26 01:38:36 2024 +0800

    chore: update readme

commit e54dacb
Merge: c1ad8cf 7e183ac
Author: BackRunner <dev@backrunner.top>
Date:   Mon Aug 26 01:34:55 2024 +0800

    Merge branch 'main' into dev

    # Conflicts:
    #	package.json

commit c1ad8cf
Author: BackRunner <dev@backrunner.top>
Date:   Mon Aug 26 01:33:40 2024 +0800

    feat: backend support for approval process

commit 05a0191
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 23:53:05 2024 +0800

    chore: update roadmap & organize the code

commit adfd9d1
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 23:46:23 2024 +0800

    feat: allow to delete a notification

commit 317ccf7
Merge: 0842c17 727f6d2
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 22:12:13 2024 +0800

    Merge branch 'main' into dev

commit 727f6d2
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 22:10:57 2024 +0800

    Squashed commit of the following:

    commit 0842c17
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 21:57:51 2024 +0800

        fix: do not send heartbeat to closed controller

    commit 84ce79d
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 21:56:18 2024 +0800

        fix: cannot remove expired subscription

    commit 4db710a
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 20:35:54 2024 +0800

        feat: enhance the experience of the alert and the guidance

    commit 4cfc1dd
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 20:26:00 2024 +0800

        feat: add privacy policy page

    commit 9920156
    Merge: e937f8c 19e8a5b
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 18:50:36 2024 +0800

        Merge branch 'main' into dev

    commit e937f8c
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 18:48:09 2024 +0800

        chore: update roadmap

    commit 7a7cd9f
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 18:45:16 2024 +0800

        feat: allow to set an allowed email list

    commit eeb575b
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 18:27:09 2024 +0800

        chore: update roadmap

    commit 2581911
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 18:26:33 2024 +0800

        chore: update roadmap

    commit a64c901
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 18:22:38 2024 +0800

        fix: align the encoding method

    commit e639829
    Author: BackRunner <dev@backrunner.top>
    Date:   Sun Aug 25 18:19:06 2024 +0800

        feat: allow to push notification with custom icon & add highlight effect to the card

    chore: bump version

commit 0842c17
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 21:57:51 2024 +0800

    fix: do not send heartbeat to closed controller

commit 84ce79d
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 21:56:18 2024 +0800

    fix: cannot remove expired subscription

commit 4db710a
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 20:35:54 2024 +0800

    feat: enhance the experience of the alert and the guidance

commit 4cfc1dd
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 20:26:00 2024 +0800

    feat: add privacy policy page

commit 9920156
Merge: e937f8c 19e8a5b
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 18:50:36 2024 +0800

    Merge branch 'main' into dev

commit e937f8c
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 18:48:09 2024 +0800

    chore: update roadmap

commit 7a7cd9f
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 18:45:16 2024 +0800

    feat: allow to set an allowed email list

commit eeb575b
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 18:27:09 2024 +0800

    chore: update roadmap

commit 2581911
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 18:26:33 2024 +0800

    chore: update roadmap

commit a64c901
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 18:22:38 2024 +0800

    fix: align the encoding method

commit e639829
Author: BackRunner <dev@backrunner.top>
Date:   Sun Aug 25 18:19:06 2024 +0800

    feat: allow to push notification with custom icon & add highlight effect to the card
  • Loading branch information
backrunner committed Aug 30, 2024
1 parent 4b2e6cc commit 57c3c66
Show file tree
Hide file tree
Showing 41 changed files with 1,858 additions and 168 deletions.
38 changes: 28 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ AlphaPush is a general-purpose push notification service with a PWA client, base
npm install
```

3. Create a `.env` file in the root directory with the following variables:
3. Create an OAuth application in your GitHub account and get the client ID and client secret.

4. Create a `.env` file in the root directory with the following variables:

```
GITHUB_CLIENT_ID=your_github_client_id
Expand All @@ -65,28 +67,30 @@ AlphaPush uses Cloudflare D1 for its database. Follow these steps to set it up:
wrangler d1 create alphapush-prod
```

3. Note the database ID from the output and add it to your `.env` file:
3. Apply migrations to your production database:

```
DB_ID=your_database_id
npm run db:migrate:prod
```

4. Generate the database schema:
4. Create a KV namespace:

```
npm run db:generate
wrangler kv:namespace create alphapush
```

5. Apply migrations to your local development database:
5. Setup the environment variables:

```
npm run db:migrate:local
DB_ID=your_database_id
```

6. Apply migrations to your production database:
6. Setup `wrangler.toml` with the following content:

```
npm run db:migrate:prod
```toml
kv_namespaces = [
{ binding = "KV", id = "your_kv_namespace_id" }
]
```

### Development
Expand Down Expand Up @@ -117,6 +121,20 @@ AlphaPush uses Cloudflare D1 for its database. Follow these steps to set it up:

This project utilizes AI-generated code to enhance development efficiency. We leverage advanced language models to assist with code generation, problem-solving, and optimization. While AI contributes to our development process, all code is reviewed and validated by human developers to ensure quality and reliability.

For information about upcoming features and our development roadmap, see the [Roadmap](#roadmap) section below.

## Roadmap

### Future Plans

- Add email authentication method
- Allow to filter notifications by category
- Add TTL (Time To Live) option for notifications
- Enable pushing encrypted notifications
- Implement a settings panel for users to reset push token and VAPID keys

For more detailed information about our development plans and progress, please check our [full roadmap](./Roadmap.md).

## License

AlphaPush is open-sourced under the MIT license. See the LICENSE file for more information.
22 changes: 13 additions & 9 deletions Roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@

## Planned Features

### v0.1.2

- [x] Add a privacy policy page.
- [x] Add a cookie agreement banner at the bottom of the page.
- [x] Add an option to allow an alert will not show up in the future once user dismiss it.

### v0.2.0
### v0.2.1

- [ ] Allow to delete a notification in both desktop and mobile devices.
- [ ] Allow to push a notification with approval process.
- [ ] Allow user to reset the push token and vapid keys in a settings panel.

### Future

Expand All @@ -22,6 +15,17 @@

## Done

### v0.2.0

- [x] Allow to delete a notification in both desktop and mobile devices.
- [x] Allow to push a notification with approval process.

### v0.1.2

- [x] Add a privacy policy page.
- [x] Add a cookie agreement banner at the bottom of the page.
- [x] Add an option to allow an alert will not show up in the future once user dismiss it.

### v0.1.1

- [x] Add a highlight effect to the notification when user enters the page from notification popup.
Expand Down
11 changes: 11 additions & 0 deletions migrations/0002_broken_emma_frost.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE TABLE `approval_processes` (
`id` text PRIMARY KEY NOT NULL,
`user_email` text NOT NULL,
`notification_id` text NOT NULL,
`webhook_url` text NOT NULL,
`state` text NOT NULL,
`created_at` integer,
`updated_at` integer
);
--> statement-breakpoint
ALTER TABLE `push_notifications` ADD `type` text;
271 changes: 271 additions & 0 deletions migrations/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
{
"version": "6",
"dialect": "sqlite",
"id": "cbb1e536-1c93-4710-b959-5591c297a5a0",
"prevId": "ec4c8523-dbfe-46bb-a3c7-1d50203c40ee",
"tables": {
"approval_processes": {
"name": "approval_processes",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"user_email": {
"name": "user_email",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"notification_id": {
"name": "notification_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"webhook_url": {
"name": "webhook_url",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"state": {
"name": "state",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"push_notifications": {
"name": "push_notifications",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"category": {
"name": "category",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"group": {
"name": "group",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"user_email": {
"name": "user_email",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"icon_url": {
"name": "icon_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"subscriptions": {
"name": "subscriptions",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"user_email": {
"name": "user_email",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"device_fingerprint": {
"name": "device_fingerprint",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"subscription": {
"name": "subscription",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"user_credentials": {
"name": "user_credentials",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"public_key": {
"name": "public_key",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"private_key": {
"name": "private_key",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"push_token": {
"name": "push_token",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"user_credentials_email_unique": {
"name": "user_credentials_email_unique",
"columns": [
"email"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {}
}
}
Loading

0 comments on commit 57c3c66

Please sign in to comment.