Nimbus cloud storage
A better cloud
Quickstart
1. Clone the Repository
git clone https://github.com/nimbusdotstorage/Nimbus.git
cd Nimbus
2. Install Dependencies
bun i
3. Set Up Postgres with Docker
We use Docker to run a PostgreSQL database for local development. Follow these steps to set it up:
-
Start the database:
bun db:upThis will start a Postgres container with default credentials:
- Host:
localhost - Port:
5432 - Database:
nimbus - Username:
postgres - Password:
postgres
- Host:
-
Verify the database is running if running a detached container:
docker compose psYou should see the
nimbus-dbcontainer in the list with a status of "Up". -
Connect to the database (optional):
# Using psql client inside the container docker compose exec postgres psql -U postgres -d nimbus
4. Environment Setup
Copy the .env.example file to .env using this command, cp .env.example .env and fill in these values. Follow the
instructions on the first step of this guide.
How to setup Google keys?
-
Navigate to Google Cloud console.
-
Create a new project and navigate to its dashboard.
-
Under API & Services, navigate to Oauth Consent Screen and enter the details.
-
Now create a client. Add Authorised Javascript origin as
http://localhost:3000and Authorised redirect uri ashttp://localhost:1284/api/auth/callback/googleand get yourclient_idandclient_secret. -
Now navigate to Audience and add Test users.
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# To generate a secret, just run `openssl rand -base64 32`
BETTER_AUTH_SECRET=
How to get a Resend API Key?
-
Go to Resend.com and sign up or log in to your account.
-
From the dashboard, click on "API Keys" in the sidebar.
-
Click the "Create API Key" button.
-
Enter a name for your key (e.g.,
nimbus-dev) and confirm. -
Copy the generated API key.
-
Add it to your
.envfile:
RESEND_API_KEY=your-api-key-here
5. Run Database Migrations
After setting up the database, run the migrations:
bun db:migrate
6. Start the Development Server
In a new terminal, start the development server:
NOTE: this starts both the web and server development servers, to run just one, use
bun dev:weborbun dev:server. Both will need the db running to work.
bun dev
The application should now be running at http://localhost:3000
7. Access Authentication
Once the development server is running, you can access the authentication pages:
- Sign In: Navigate to http://localhost:3000/signin
- Sign Up: Navigate to http://localhost:3000/signup
Make sure you have configured the Google OAuth credentials in your .env file as described in step 4 for authentication
to work properly. Additionally, configure your Resend API key for the forgot password functionality to work.
If you want to contribute, please refer to the contributing guide