Category | Feature | Icon |
---|---|---|
CRUD Operations | Create | β¨ |
Read | π | |
Update | π | |
Delete | ποΈ | |
Styling | Tailwind CSS | π¨ |
Responsive Design | π± | |
Authentication | Login | π |
Signup | βοΈ | |
Single Sign On (SSO) | π | |
Email Verification | π§ | |
Many Checks During Signup and login | β | |
Security | Protect Website from Disposable Email | π«βοΈ |
Protect from (CSRF) Attack | π‘οΈ | |
Rate Limiting | β³ | |
New Login Verification | π | |
Notes and password are Encrypted in Database | π | |
Account Recovery | Reset Password | |
Change Email |
First, go to the Gmail Account Security Settings In the search bar, type "app password"
and follow the instructions to create an app password for your Gmail account then copy password and save it, This will be used for email verification.
Note: 2-Step verification must be enabled on your Gmail account; otherwise, you will not be able to create an app password.
1. Go to MongoDB Cloud. If you do not have an account, create one.
2. Create a database cluster, For tutorial simply search or Click Here
-
Google:
To getGOOGLE_CLIENT_ID
andGOOGLE_CLIENT_SECRET
got to Google Cloud and create OAuth Credentials, For tutorial simply search or Click Here -
Github:
To getGITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
got to GIthub Developer Settings and create OAuth Credentials, For tutorial simply search or Click Here -
Microsoft:
To getMICROSOFT_CLIENT_ID
andMICROSOFT_CLIENT_SECRET
got to Azure App Registrations and create OAuth Credentials, For tutorial simply search or Click Here -
Discord:
To getDISCORD_CLIENT_ID
andDISCORD_CLIENT_SECRET
got to Discord Developer and create OAuth Credentials, For tutorial simply search or Click Here
- Clone this repository to your local machine.
git clone https://github.com/Emmraan/notek.git
- Navigate to the project directory.
cd notek
- Install dependencies using npm:
npm install
## Replace the username password and Database name.
1. MONGO_URI="mongodb+srv://<username>:<password>@cluster0.4m7l6.mongodb.net/<yourDBname>?retryWrites=true&w=majority&appName=Cluster0"
## Generate or create a long hex secret for JWT_SECRET, SESSION_SECRET and NOTE_SECRET e.g., 7f45d1f47ebf4e1af1e148cd00fe97e5472df8e5b5c8e8af
2. JWT_SECRET=your_jwt_seceret_here
3. PORT=3000
4. USER= <here your email>
5. PASS= <here your app password>
## This domain is attached before email_verify route!
## For development purposes, use: http://localhost:3000
6. DOMAIN= <here your domain>
## session secrect same like jwt secrect
7. SESSION_SECRET=your_session_seceret_here
## NOTE secrect same like jwt and session secrect but make sure the length of NOTE_SECRET is 32 .
8. NOTE_SECRET=your_session_seceret_here
9.GOOGLE_CLIENT_ID=<here your GOOGLE_CLIENT_ID>
10.GOOGLE_CLIENT_SECRET=<here your GOOGLE_CLIENT_SECRET>
11.GITHUB_CLIENT_ID=<here your GITHUB_CLIENT_ID>
12.GITHUB_CLIENT_SECRET=<here your GITHUB_CLIENT_SECRET>
13.MICROSOFT_CLIENT_ID=<here your MICROSOFT_CLIENT_ID>
14.MICROSOFT_CLIENT_SECRET=<here your MICROSOFT_CLIENT_SECRET>
15.DISCORD_CLIENT_ID=<here your DISCORD_CLIENT_ID>
16.DISCORD_CLIENT_SECRET=<here your DISCORD_CLIENT_SECRET>
npm run dev
Accessing the Server On π http://localhost:300
Note: Make sure .env file is setup in your root directory before build the docker image, and DOCKER installed in your system!
# Build the app
docker build -t your-image-name .
# Run Docker container for development
docker run -d -p 3000:3000 --name your-container-name your-image-name
# Now for Run the container without `TypeError: OAuth2Strategy requires a clientID option` error we have required to copy .env file in docker container
docker cp `/path/your/.env/file` <container-name>:/app/.env
or
docker cp `/path/your/.env/file` <container-id>:/app/.env
## Now Restart The Container
docker restart <your-container-name> or <your-container_id>
# To stop the container
docker stop your-container-name
# To remove the container
docker rm your-container-name
# To remove the image
docker rmi your-image-name
Accessing the Container On π http://localhost:3000
Note: Make sure .env file is setup in your system before Running the docker image, and DOCKER installed in your system!
docker pull emmraan/notek:latest
docker pull emmraan/notek:`<version>` (e.g., 2.2.2)
docker run -d -p 3000:3000 --name `your-container-name` emmraan/notek
Now for Run the container without TypeError: OAuth2Strategy requires a clientID option
error we have required to copy .env file in docker container
docker cp `/path/your/.env/file` <container-name>:/app/.env
or
docker cp `/path/your/.env/file` <container-id>:/app/.env
docker restart <your-container-name> or <your-container_id>
Accessing the Container On π http://localhost:3000
docker stop your-container-name or your-container_id
docker rm your-container-name or your-container_id
docker rmi emmraan/notek or image_id
docker rmi emmraan/notek:<version> (e.g., 2.2.2) or image_id
If you find a bug in the project, please open an issue by following the bug report template. Provide as much detail as possible to help us resolve the issue quickly.
We welcome feature requests! Please follow the feature request template to suggest new features. Be sure to provide enough context and details.
We love pull requests from everyone. Hereβs a quick guide to help you get started:
- π΄ Fork the repository.
- πΏ Create a branch:
git checkout -b my-feature-branch
. - π οΈ Make your changes.
- β
Commit your changes:
git commit -m 'Add new feature'
. - π Push to the branch:
git push origin my-feature-branch
. - π₯ Open a pull request.
Please ensure your pull request adheres to the pull request template.
- Follow the existing code style and structure.
- Write meaningful commit messages.
- Add comments to your code where necessary.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.