Skip to content

ysheliakin/pallass

Repository files navigation

pallass

Pallas’s Hub is an innovative web application designed to serve as a comprehensive platform for researchers and scholars to collaborate, share knowledge, and secure funding opportunities. It addresses the fragmented nature of current tools by offering integrated features tailored to the needs of the scientific community.

Development Set Up

Prerequisites

Database

To start the database server (ssh into AWS RDS)

chmod +x ./db.sh
./db.sh [PRIVATE_KEY_FILE] [RDS_ENDPOINT] [IP_ADDRESS]

Then, connect in your database client on localhost:5432 using the credentials.

Migrations (schema changes)

To create a new empty SQL migration file
goose -dir migrations create [MIGRATION_NAME] sql

In the 'up' portion of the file add the queries (usually DDL statements). Do not use the 'down' portion to undo changes in 'up' Instead, simply create another migration. This will ensure an easy trail of changes to the database (since we're always connecting directly to the production instance via SSH).

To apply new schema changes
goose -dir migrations postgres [SQL_CONNECTION_STRING] up

Check the output of goose to see if the migrations run successfully and adjust the queries if an error occurred.

See more information about goose usage in its documentation.

Creating Database Queries

First, create/update the SQL queries inside server/queries. See documentation on how to use annotations to tell sqlc what code to generate.

Then, use sqlc to generate Go code based on those SQL queries:

cd server
sqlc generate

Make sure you commit all the code added/removed by sqlc and yourself in server/queries and server/generated directories.

Client

To run react.js dev server

cd client
npm i
npm run dev

Server

Set environment variables

export DB="<get the database connection string from a peer>"
export GMAL_USERNAME="<get the credential from a peer>"
export GMAIL_PASSWORD="[<get the credential from a peer>"
export JWT_SECRET_KEY="[<get the key from a peer>"

To run dev server

cd server
go run .

Alternatively, run live reload dev server using Air:

cd server
air

Wireframes

Links to the wireframes:

About

Pallas's Hub is a research collaboration platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors