1Projects: Quickly restore your .env file secrets
We may have all fallen victim at some point!
After playing around with 1Password for about a week, turns out it's a pretty nice to have - password manager, especially for developers (highly recommended).
1Password touches on every aspect where in most cases a user wants to store any secret text or file.
Thank you hashnode for the hackathon opportunity.
Description
1Projects is a simple GUI application written in Flutter, built on top of 1Password-CLI that allows you to set up secrets in your projects' .env
file.
The application lets a user install secrets (API, credentials, env parameters, etc) into a specified folder.
Simply put... 1Projects communicates with 1Password via the console interface. To allow faster processing of information between 1Projects and 1Password, I used the json parameter on all commands as indicated below.
op item get [{ <itemName> | <itemID> | <shareLink> | - }] --format json
Inspiration
1Password has already developed what to me is a very incredible software and I simply wanted to add a simple missing ingredient to it.
Being a developer, I realized that sometimes I work with virtual hosts (ec2) and operating systems (Virtualbox) and coping secrets from one point to another is a tedious amount of work (on the grand scale of things). Especially if you work in a company that at some point and due to one reason or another wants to migrate their services to another platform/cloud.
This is where 1Projects comes in. Based on the scenario described above, You can create a project (Secure Note), add instructions (using markdown) and specify the secrets to be used on the project. Once you setup your new host (on ec2, at home or on virtualbox) along with 1Password installed, you can easily use 1Projects to map your projects and install the respective secrets.
Tech Stack
Flutter - Flutter transforms the app development process. Build, test, and deploy beautiful mobile, web, desktop, and embedded apps from a single codebase.
1Password (GUI and CLI) - Go ahead. Forget your passwords.
Application
Here are some of the possible applications for 1Projects. There may be other applications not listed here... feel free to leave a comment below.
Newbies - Every new developer recruit at any company will want to use this app as their recruiter can simply share a 1Password vault and gain access to ongoing projects' secrets as well as how to set them up.
Personal Template - As developers, starting everything from scratch can be a pain in the ***. 1Projects provides a solution to template your project's secrets setup as well as select and install them. This is usually after setting up a new system (complete wipe) and then syncing back your projects from GitHub... then it downs on you that the
.env
files are missing as it's with every developer practice to not sync up.env
files.Team Productivity - Working with teams has never been simpler when your team leader wants every team member to set up the project on their host machines and then there is a "Brian" on the team who needs X credentials or further instructions on the setup procedure.
Restoration Solution (for
.env
files) - No developer backs up.env
files in the local machines where they develop applications. 1Projects currently provides the solution to restore.env
secret files from 1Password.Hopefully one day in the future, I'll implement a backup solution as well.
Challenges
No major challenges were encountered while developing the application.
I only had one minor challenge which was maintaining a 1Password shell session. I was able to overcome this by starting a single shell session, listening and storing outputs as the application sent console commands as it waited for the output to register.
Public Code
You can install 1Projects into your system by building the Flutter applications at the following GitHub repo. Don't forget to star ๐!
1Projects - https://github.com/johnfidel98/one_projects