ShortcutU is a powerful text expansion Chrome extension that allows you to create and use custom shortcuts to expand into longer text snippets. This tool is perfect for increasing productivity by automating repetitive typing tasks.
- Create custom text shortcuts
- Expand shortcuts into longer text snippets
- Works across various text input fields in Chrome
- Secure user authentication
- Private server setup for data privacy
- Clone this repository or download the source code.
- Open Chrome and navigate to
chrome://extensions/
. - Enable "Developer mode" in the top right corner.
- Click "Load unpacked" and select the directory containing the extension files.
The server is built with Node.js and uses MySQL for data storage. Follow these steps to set up your private server:
-
Ensure you have Node.js and MySQL installed on your server.
-
Clone the repository on your server:
git clone https://github.com/georgittanchev/ShortcutU.git cd shortcutu-app
-
Install the required dependencies:
npm install
-
Set up your MySQL database:
- Create a new database named
shortcutu
- Create a user with access to this database
- Update the database connection details in
server.js
:const pool = mysql.createPool({ host: 'localhost', user: 'your_mysql_username', password: 'your_mysql_password', database: 'shortcutu', connectionLimit: 10 });
- Create a new database named
-
Set up SSL/TLS for HTTPS:
- Obtain SSL/TLS certificates for your domain
- Update the paths in
server.js
to point to your certificate files:const options = { key: fs.readFileSync('path/to/your/key.key'), cert: fs.readFileSync('path/to/your/crt.crt'), ca: fs.readFileSync('path/to/your/ca.pem') };
-
Update the
JWT_SECRET
inserver.js
with a secure, randomly generated key:const JWT_SECRET = 'your_secure_random_key';
-
Create the necessary database tables using the following SQL queries:
CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) NOT NULL UNIQUE, password VARCHAR(255) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE shortcuts ( id INT AUTO_INCREMENT PRIMARY KEY, user_id INT NOT NULL, shortcut VARCHAR(255) NOT NULL, expansion TEXT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE );
-
Start the server:
node server.js
-
The server should now be running on port 3222 (or the port you specified).
-
After installing the Chrome extension and setting up the server, click on the ShortcutU icon in your Chrome toolbar.
-
Log in using your credentials.
-
Create new shortcuts by specifying a shortcut text and its expansion.
-
Use your shortcuts in any text input field in Chrome. When you type a shortcut followed by a space or newline, it will automatically expand to the specified text.
By hosting your own server, you ensure that all your shortcut data remains private and under your control. The server uses HTTPS for secure communication and JWT for user authentication.
You can customize the server port by modifying the PORT
variable in server.js
:
const PORT = process.env.PORT || 3222;
If you encounter any issues:
- Check the browser console for any error messages from the extension.
- Check the server logs for any backend errors.
- Ensure your database connection details are correct.
- Verify that your SSL/TLS certificates are valid and properly configured.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
Please include the appropriate attribution to this GitHub repo when using or distributing this software.
Please open an issue on the GitHub repository for more information or support.