Skip to content

Commit db642eb

Browse files
authored
Merge pull request #7 from qridwan/feature/update-readme
update environment file and README
2 parents 02ca973 + 4885c7b commit db642eb

3 files changed

Lines changed: 90 additions & 140 deletions

File tree

File renamed without changes.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,6 @@ out
124124
.yarn/build-state.yml
125125
.yarn/install-state.gz
126126
.pnp.*
127+
128+
dist/*
129+
.DS_Store

README.md

Lines changed: 87 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,51 @@
1-
# xNote application Backend Service
1+
# xNote Application Backend Service
22

3-
## [API Documentation](https://documenter.getpostman.com/view/15074292/2s9YXfcimY#22177e0b-79c1-499f-ad21-a4e7deb0b6cf)
4-
## [LIVE](https://xnote.qridwan.com)
3+
## Table of Contents
54

6-
----
5+
1. [Introduction](#introduction)
6+
2. [Features](#features)
7+
3. [Installation](#installation)
8+
4. [Data Requirements](#data-requirements)
9+
- [Users](#users)
10+
- [Notes](#notes)
11+
- [Categories](#categories)
12+
- [Tags](#tags)
13+
- [Attachments](#attachments)
14+
- [Notebooks](#notebooks)
15+
- [Trash](#trash)
16+
- [Sharing](#sharing)
17+
- [Permissions](#permissions)
18+
5. [Database E/R Design](#database-er-design)
19+
6. [Links](#links)
720

8-
1. **Smart Note Taking Application**
21+
---
922

10-
Digital platform that allows users to create, manage, and organize text-based notes. It provides users with the ability to create, edit, categorize, and search for notes, making it easy to capture and retrieve information efficiently.
23+
## Introduction
1124

12-
----
25+
**xNote** is a smart note-taking application that provides a digital platform for users to create, manage, and organize text-based notes. It enables users to efficiently capture, edit, categorize, and search for notes.
1326

14-
**2. Features:**
27+
---
1528

16-
- User Registration and Login:
17-
- Users can create accounts and log in securely.
18-
- Create and Edit Notes:
19-
- Users can create new text-based notes.
20-
- Notes can be edited and updated as needed.
21-
- Note Organization:
22-
- Users can organize their notes into notebooks or folders.
23-
- Notes can have tags for easy categorization.
24-
- Attachments:
25-
- Users can attach files (e.g., images, documents) to their notes.
26-
- Trash and Recovery:
27-
- Deleted notes are moved to the trash and can be recovered.
28-
- Sharing:
29-
- Users can share notes with others.
30-
- Collaborative note editing and commenting.
29+
## Features
3130

32-
----
31+
- **User Registration and Login**\
32+
Secure account creation and login.
33+
- **Create and Edit Notes**\
34+
Ability to create, edit, and update text-based notes.
35+
- **Note Organization**\
36+
Organize notes into notebooks or folders with tags for better categorization.
37+
- **Attachments**\
38+
Attach files (e.g., images, documents) to notes.
39+
- **Trash and Recovery**\
40+
Deleted notes are moved to trash and can be recovered.
41+
- **Sharing**\
42+
Share notes with others, including collaborative editing and commenting.
3343

34-
**3. Installation**
44+
---
3545

36-
To install the xNote application backend service, follow these steps:
46+
## Installation
47+
48+
To install the xNote application backend service:
3749

3850
1. Clone the repository:
3951
```bash
@@ -43,170 +55,105 @@ To install the xNote application backend service, follow these steps:
4355
```bash
4456
cd xNote-server
4557
```
46-
3. Install the dependencies:
58+
3. Install dependencies:
4759
```bash
4860
yarn
4961
```
50-
51-
4. Set up the environment variables by creating a `.env` file and adding the necessary configurations from `.env.example`
52-
53-
5. Start the server:
62+
4. Set up environment variables by creating a `.env` file using configurations from `.env.example`.
63+
5. Seed the database using the provided SQL file:
5464
```bash
55-
yarn dev
65+
src/database/qridwan_xnote.sql
66+
```
67+
6. Start the server:
68+
```bash
69+
yarn dev
70+
```
71+
```bash
72+
yarn dev
5673
```
57-
------
58-
59-
**4. Data Requirements:**
60-
61-
**Users:**
62-
63-
- User ID (Primary Key)
64-
- Username
65-
- Email
66-
- Password
6774

68-
Example:
75+
---
6976

70-
| userID (PK) | username | email | password |
71-
| ----------- | -------- | ---------------- | --------- |
72-
| 101 | ridwan | mail@qridwan.com | ridwan123 |
73-
| 102 | asad | mail@asad.com | asad123 |
77+
## Data Requirements
7478

75-
**Notes:**
79+
### Users
7680

77-
- Note ID (Primary Key)
78-
- User ID (Foreign Key)
79-
- Note Title
80-
- Note Content
81-
- Creation Timestamp
82-
- Update Timestamp
81+
| userID (PK) | username | email | password |
82+
| ----------- | -------- | ------------------------------------------- | --------- |
83+
| 101 | ridwan | [mail@qridwan.com](mailto:mail@qridwan.com) | ridwan123 |
84+
| 102 | asad | [mail@asad.com](mailto:mail@asad.com) | asad123 |
8385

84-
Example:
86+
### Notes
8587

8688
| noteID (PK) | userID (FK) | note_title | content | created_at | updated_at |
8789
| ----------- | ----------- | ---------- | -------- | ---------- | ---------- |
8890
| 1 | 101 | title 1 | content1 | timezone | timezone |
89-
| 2 | 101 | title 2 | content2 | timezone | timezone |
90-
| 3 | 102 | title 3 | content3 | timezone | timezone |
9191

92-
**Categories:**
93-
94-
- Category ID (Primary Key)
95-
- User ID (Foreign Key)
96-
- Category Name
97-
98-
Example data for the "Categories" table:
92+
### Categories
9993

10094
| categoryID (PK) | userID (FK) | category_name |
10195
| --------------- | ----------- | ------------- |
10296
| 1 | 101 | Work |
10397
| 2 | 101 | Personal |
10498

105-
**Tags:**
106-
107-
- Tag ID (Primary Key)
108-
- User ID (Foreign Key)
109-
- Tag Name
110-
111-
Example data for the "Tags" table:
99+
### Tags
112100

113101
| tagID (PK) | userID (FK) | tag_name |
114102
| ---------- | ----------- | --------- |
115103
| 1 | 101 | Important |
116104
| 2 | 101 | Travel |
117105

118-
**Attachments:**
119-
120-
- Attachment ID (Primary Key)
121-
- Note ID (Foreign Key)
122-
- Attachment File Name
123-
- Attachment File Type
124-
- Attachment File Path
106+
### Attachments
125107

126-
| attID (PK) | noteID (FK) | att_filename | att_fitetype | att_file_path |
108+
| attID (PK) | noteID (FK) | att_filename | att_filetype | att_file_path |
127109
| ---------- | ----------- | ------------ | ------------ | -------------- |
128110
| 1 | 1 | note1 | png | work/note1.png |
129-
| | | | | |
130111

131-
**Notebooks:**
132-
133-
- Notebook ID (Primary Key)
134-
- User ID (Foreign Key)
135-
- Notebook Name
136-
- note id
112+
### Notebooks
137113

138114
| notebookID | userID | notebook_name | note_id |
139115
| ---------- | ------ | ------------- | ------- |
140116
| 1 | 101 | book1 | 2 |
141-
| | | | |
142-
143-
**Trash:**
144117

145-
- Trash ID (Primary Key)
146-
- User ID (Foreign Key)
147-
- Deleted Note ID (Foreign Key)
148-
- Deletion Timestamp
118+
### Trash
149119

150-
| trashID (PK) | userID (FK | noteID (FK) | timestamp |
151-
| ------------ | ---------- | ----------- | ----------- |
152-
| 1 | 101 | 2 | 12/08/2023… |
153-
| | | | |
120+
| trashID (PK) | userID (FK) | noteID (FK) | timestamp |
121+
| ------------ | ----------- | ----------- | ---------- |
122+
| 1 | 101 | 2 | 12/08/2023 |
154123

155-
**Sharing:**
156-
157-
- Sharing ID (Primary Key)
158-
- Note ID (Foreign Key)
159-
- Shared User ID (Foreign Key)
160-
- Sharing Permissions
124+
### Sharing
161125

162126
| sharingID (PK) | noteID (FK) | sharedUserID (FK) | permissionID (FK) |
163127
| -------------- | ----------- | ----------------- | ----------------- |
164-
| | | | |
165128
| abc01 | 2 | 101 | 1 |
166129

167-
**Permission:**
168-
169-
- permission ID (Primary key)
170-
- permission name
130+
### Permissions
171131

172132
| permissionID (PK) | permission_name |
173133
| ----------------- | --------------- |
174134
| 1 | edit |
175135
| 2 | view |
176136
| 3 | comment |
177137

178-
**D. E/R Design for the Database:**
138+
---
179139

180-
Here's a simplified E/R diagram for the Note-Taking Application:
140+
## Database E/R Design
181141

182142
- **Entities:**
183-
1. User
184-
2. Note
185-
3. Category
186-
4. Tag
187-
5. Attachment
188-
6. Notebook
189-
7. Trash
190-
8. Sharing
191-
9. Permission
192-
193-
**Relationships:**
194-
195-
1. User creates Note (One-to-Many)
196-
- User (1) ------< Note (Many)
197-
2. User organizes Note into Category (Many-to-Many)
198-
- User (Many) ------< Category_Note >------ (Many) Category
199-
3. User assigns Tag to Note (Many-to-Many)
200-
- User (Many) ------< Tag_Note >------ (Many) Tag
201-
4. Note contains Attachment (One-to-Many)
202-
- Note (1) ------< Attachment (Many)
203-
5. User organizes Note into Notebook (Many-to-Many)
204-
- User (Many) ------< Notebook_Note >------ (Many) Notebook
205-
6. User deletes Note to Trash (One-to-Many)
206-
- User (1) ------< Trash (Many) ------< Note (Many)
207-
7. User shares Note with other User (Many-to-Many)
208-
- User (one) ------< Sharing >------ (Many) User
209-
8. Sharable note only have one permission (Many-to-One)
210-
- Note (Many) >------ permission (One)
211-
212-
<img src="./__support__/xNote.jpg" alt="DATABASE" width="100%" />
143+
- User, Note, Category, Tag, Attachment, Notebook, Trash, Sharing, Permission
144+
- **Relationships:**
145+
1. User (1) ------< Note (Many)
146+
2. User (Many) ------< Category_Note >------ (Many) Category
147+
3. User (Many) ------< Tag_Note >------ (Many) Tag
148+
4. Note (1) ------< Attachment (Many)
149+
5. User (Many) ------< Notebook_Note >------ (Many) Notebook
150+
6. User (1) ------< Trash (Many) ------< Note (Many)
151+
7. User (one) ------< Sharing >------ (Many) User
152+
8. Note (Many) >------ permission (One)
153+
154+
---
155+
156+
## Links
157+
158+
- [**API Documentation**](https://documenter.getpostman.com/view/15074292/2s9YXfcimY#22177e0b-79c1-499f-ad21-a4e7deb0b6cf)
159+
<!-- - [**LIVE Application**](https://xnote.qridwan.com) -->

0 commit comments

Comments
 (0)