Important
Please download MPA for VS Code extensions to bring you a wonderful markdown writing experience
Note
See changelog to find all important changes made to this project
Anonymous messenger similar to secreto. This application uses the NextJS (TypeScript) framework which is supported by the Supabase database. This project is an improvisation of the @sofaemha/rahasia
project inspired by @sooluh/secret
, and original from @Reynadi531/secret-message
.
- Node.js 16.14 or later.
- macOS, Windows (including WSL), and Linux are supported.
Warning
You need to create account first, the easiest way is sign-in using github account. Then create a new database project, copy code below into integrated terminal, and done.
Query to create table heart :
CREATE TABLE heart (
id BIGINT GENERATED ALWAYS AS IDENTITY NOT NULL,
ip TEXT DEFAULT '' NOT NULL,
parent BIGINT NULL,
created TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL
PRIMARY KEY (id),
);
Query to create table messages :
CREATE TABLE messages (
id BIGINT GENERATED ALWAYS AS IDENTITY NOT NULL,
message TEXT DEFAULT '' NOT NULL,
owner BOOL DEFAULT FALSE NOT NULL,
active BOOL DEFAULT TRUE NOT NULL,
parent BIGINT NULL,
created TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
deleted TIMESTAMP WITH TIME ZONE DEFAULT NULL NULL,
PRIMARY KEY (id),
FOREIGN KEY (parent) REFERENCES messages (id)
);
Clone the GitHub repository using git :
# HTTPS
git clone https://github.com/sofaemha/sofaemha.git
# SSH
git clone [email protected]:sofaemha/rahasia.git
# GitHub CLI
gh repo clone sofaemha/rahasia
Or directly download the zip file from GitHub : master.zip
Install all dependencies using NPM :
npm install
Note
Only for Windows OS or lightweight shell and GNU utilities compiled for Windows (part of MinGW)
I have created a shortcut command to run a development server :
sh x -r
If you use the command above, your browser will automatically open and display the results, as long as the focus is on the window.
See the x file for further customization or Custom Command as the documentation handle.
In the package file there are several commands that can be run, including :
npm run dev
# or
yarn dev
# or
pnpm dev
If using the above command, you need to open http://localhost:3000 with your browser to see the result.
To learn more about Next.js, take a look at the following resources :
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out their Next.js deployment documentation for more details.
Note
Only for Windows OS or lightweight shell and GNU utilities compiled for Windows (part of MinGW)
I created custom commands to support personal needs. By using the bash programming language, there are several commands that I made as follows :
Usage : sh x [options] [?github:options]
Options : -h
| -r
| -b
| -gh [options]
-gh
Options : -i
| -u
If you want to skip the pause, please comment the following line :
eval $clear
echo "OS type lightweight shell and GNU utilities compiled for Windows (part of MinGW)"
read -p "Press any key to continue... (or CTRL+C to exit)" -n1 -s
Provides Help information for Windows commands.
Usage : sh x -h
or sh x --help
Code :
...
echo -e "\nShortcut custom command for project development.\n"
echo -e "Usage: sh x [options] [?github:options]\n"
echo -e "Options:\n"
echo -e " -h, --help \t\t Provides Help information for Windows commands."
echo -e " -r, --run \t\t Running localhost in default browser."
echo -e " -b, --bash \t\t Running Git Bash in current directory."
echo -e " -gh, --github \t GitHub repository commands."
echo -e " [gh] | -i, --init \t GitHub repository initialization."
echo -e " [gh] | -u, --update \t GitHub updating repository."
...
Running Git Bash in current directory.
Usage : sh x -b
or sh x --bash
Code :
...
start "" "C:\Program Files\Git\git-bash.exe"
...
Running localhost in default browser.
Usage : sh x -r
or sh x --run
Code :
...
explorer "http://localhost:3000/"
npm run dev
...
GitHub repository commands for initialization and updating repository.
Usage : sh x -gh [options]
or sh x --github [options]
Options : -i
, --init
or -u
, --update
Code :
# sh x -gh -i
...
read repo
read branch
git init
git branch -M "$branch"
git remote add origin "$repo"
...
# sh x -gh -u
...
read message
read branch
git add *
git commit -m "$message"
git branch -M "$branch"
git push -u origin "$branch"
...