Skip to content

Commit 4f57e1e

Browse files
committed
change Braedon to Shriram. Update git clone to target utd-notebook. Remove database migration section.
1 parent 72b2697 commit 4f57e1e

File tree

1 file changed

+5
-67
lines changed

1 file changed

+5
-67
lines changed

README.md

Lines changed: 5 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ _What am I_
55
## Contributing
66

77
We are always open to contributions to the project. If you would like to contribute and want some guidance on where to start,
8-
please join our [Discord](http://discord.utdnebula.com/) and ask for drop a message in the `#jupiter-general` channel or
9-
DM Braedon for more details.
8+
please join our [Discord](http://discord.utdnebula.com/) and ask for drop a message in the `#notebook-general` channel or
9+
DM Shriram for more details.
1010

1111
Currently, we're tracking all issues via GitHub Issues. If you would like to work on an issue, please comment on the issue and we will assign it to you.
1212
If you see anything that you think could be improved, please create an issue and we will look into it.
@@ -18,13 +18,13 @@ Please make sure you have at least [NodeJS v21.1.0](https://nodejs.org/en) or gr
1818
Start by cloning the repository to your local machine.
1919

2020
```bash
21-
git clone https://github.com/UTDNebula/jupiter.git
21+
git clone https://github.com/UTDNebula/utd-notebook.git
2222
```
2323

2424
Next, navigate to the project directory and install the dependencies.
2525

2626
```bash
27-
cd jupiter
27+
cd utd-notebook
2828
npm install
2929
```
3030

@@ -44,72 +44,10 @@ or by running the following command in your terminal.
4444
openssl rand -hex 32
4545
```
4646

47-
Jupiter uses an ORM called [Drizzle](https://orm.drizzle.team/) to interact with the database. In order to connect to the database, you will need to add the `DATABASE_URL` variable to your `.env` file.
48-
49-
We're using Neon as our database provider. You can create a Neon account [here](https://neon.com/). Once you have created an account, you can create a new project and add the `DATABASE_URL` to your `.env` file. From a Neon project, you can find the `DATABASE_URL` by navigating to the `Dashboard` tab and clicking on the `Connect` button.
47+
Jupiter uses an ORM called [Drizzle](https://orm.drizzle.team/) to interact with the database. In order to connect to the database, you will need to add the `DATABASE_URL` variable to your `.env` file. Your project lead will give this to you upon request.
5048

5149
The Nebula API is used for image storage. The `NEBULA_API_URL` variable should be set to `https://api.utdnebula.com/` and the `NEBULA_API_STORAGE_BUCKET` variable to `jupiter`. An API key and storage key should be requested from the project lead for the `NEBULA_API_KEY` and `NEBULA_API_STORAGE_KEY` variables.
5250

53-
#### Database Migrations
54-
55-
In your SQL editor, you will have to run a couple commands in order to properly set up the database
56-
57-
<details>
58-
<summary>Nanoid</summary><br />
59-
60-
Run the following command to install the nanoid extension.
61-
62-
```sql
63-
CREATE EXTENSION IF NOT EXISTS pgcrypto;
64-
65-
CREATE OR REPLACE FUNCTION nanoid(size int DEFAULT 21, alphabet text DEFAULT '_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
66-
RETURNS text
67-
LANGUAGE plpgsql
68-
volatile
69-
AS
70-
$$
71-
DECLARE
72-
idBuilder text := '';
73-
i int := 0;
74-
bytes bytea;
75-
alphabetIndex int;
76-
mask int;
77-
step int;
78-
BEGIN
79-
mask := (2 << cast(floor(log(length(alphabet) - 1) / log(2)) as int)) - 1;
80-
step := cast(ceil(1.6 * mask * size / length(alphabet)) AS int);
81-
82-
while true
83-
loop
84-
bytes := gen_random_bytes(size);
85-
while i < size
86-
loop
87-
alphabetIndex := (get_byte(bytes, i) & mask) + 1;
88-
if alphabetIndex <= length(alphabet) then
89-
idBuilder := idBuilder || substr(alphabet, alphabetIndex, 1);
90-
if length(idBuilder) = size then
91-
return idBuilder;
92-
end if;
93-
end if;
94-
i = i + 1;
95-
end loop;
96-
97-
i := 0;
98-
end loop;
99-
END
100-
$$;
101-
```
102-
103-
</details>
104-
105-
Once you have added the `DATABASE_URL` to your `.env` file, and have all the necessary extensions, you will need to run the following commands to create the tables in your database.
106-
107-
```bash
108-
npm run drizzle:push
109-
```
110-
111-
These commands will create the tables in your database based on the models defined in the `src/server/db/schema.ts` directory. You would also run these commands anytime there are changes to `schema.ts` in order to update the database.
112-
11351
Finally, start the development server.
11452

11553
```bash

0 commit comments

Comments
 (0)