Skip to content

Commit cbfeabe

Browse files
Merge branch 'develop' into feature/simple-profile-dropdown
2 parents ea32003 + b12c640 commit cbfeabe

File tree

25 files changed

+1830
-320
lines changed

25 files changed

+1830
-320
lines changed

.env.example

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@ _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-chat` channel or
9-
DM Ruben 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.
1313

1414
### Getting Started
1515

16-
Please make sure you have at least [NodeJS v18.0.0](https://nodejs.org/en) or greater installed before continuing.
16+
Please make sure you have at least [NodeJS v21.1.0](https://nodejs.org/en) or greater installed before continuing.
1717

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 Supabase as our database provider. You can create a supabase account [here](https://supabase.io/). Once you have created an account, you can create a new project and add the `DATABASE_URL` to your `.env` file. From a Supabase project, you can find the `DATABASE_URL` by navigating to the `Settings` tab and clicking on the `Database` tab.
47+
UTD Notebook 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

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

0 commit comments

Comments
 (0)