Skip to content

AOPLab/PenDown-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


PenDown
PenDown

Official Documentation (with Instructions)

IM 3007 Term Project Group 帝大南院

FE website status BE (Repository)

Promo Video YouTube Intro Milestone 3 Presentation YouTube Demo

react chakra go postgresql drone

Table of Contents

Introduction

PenDown is a platform for sharing notes and ideas. We are on a mission to bring together the best notes from students and professionals all over the world. Pen down, and you can start absorbing knowledge from others!

More can be seen on our website and also on our About page.

Demo

Our application is deployed at https://pendown.icheft.tech. We did not set up our Backend service site, but the API documentation can be given upon request.

We recommend you to run this project by directly going to our site and experience our service yourself.

‼️ Please visit https://pendown.icheft.tech · https://pendown.icheft.tech · https://pendown.icheft.tech before you test it out locally.

IF, local deployment is still necessary, instructions are shown as follows:

Development

  • We have set up our frontend and backend in different repositories.
  • You can find all the instructions on this page.

react chakra

  • Again, we have deployed our frontend website on https://pendown.icheft.tech. No need to run this app on your local environment.
  • Please ask the development team for the .env file.

🔩 For Local Development:

Dev Environment

Development

  1. Clone this repository
git clone https://github.com/AOPLab/PenDown-fe-chakra.git
  1. Open the directory in your favorite text editor (VS Code is highly recommended). If you are using VS Code, please make sure you have the mentioned plugins installed.
  2. In terminal, use yarn to install the dependencies.
  3. Before you run our app, please connect to a backend server (either ours or yours)
  4. Run yarn start to run the app in the development mode.
Connecting to Our Server

You have two options:

  1. Please contact us for the .env file. Our present data are all stored in our server.
  2. If you want to replicate this app, please also consider to clone our PenDown-be repository, and follow the instructions there.

In your .env, you should put in:

SKIP_PREFLIGHT_CHECK = true
REACT_APP_API_ROOT='http://127.0.0.1:8080'
REACT_APP_OAUTH_ID=YOUR_AUTH_ID

You should sign up for your own "Continue with Google" AUTH ID. That said, it won't cost you anything if you don't do so, that'll allow your clients to continue without Google.

That'll do it.

Unit Testing

Please check out our Frontend repo to see the instructions for unit testing.

gopostgresql

  • We have deployed our backend website, yet there is no documentation available via the Internet. However, that means you DO NOT HAVE to start the server on your local environment in order to get your replica working, simply connecting to our backend is fine.
  • API Brainstorming Documentation is upon request
  • Please ask the development team for the .env file and the pendown-firebase.json file.

🪛 For local development:

Before You Start

Notice (for Windows users):

If you don't want to set up environment, you can jump to the Set Up section and then go for Option 2 - Using Docker

Although you download both golang and gcc, you may still start fail due to package dependency.

Therefore, Docker is the recommended method.

  1. Install golang

    You should follow the official install instruction.

  2. Check golang version

    You can check in your terminal.

    go version
    
    // expected output, at least 1.17.6
    // go version go1.17.6
  3. Install gcc

    Check you have gcc or type gcc -v in terminal. (Version at least 8.1.0 or above)

Set Up

  1. Clone project

    git clone https://github.com/AOPLab/PenDown-be.git
  2. Change directory

    cd github.com/AOPLab/PenDown-be
  3. Copy configuration files

    cp .env.example .env
  4. Put firebase file (pendown-firebase.json file)

    Put your firebase secret file (json format) in root. Follow official document to get it.

    Or contact us to get the file, which is recommended.

  5. Edit .env file

    # PostgreSQL
    PG_HOST=
    PG_PORT=5432
    PG_USERNAME=postgres
    PG_PASSWORD=
    PG_DBNAME=
    
    # Firebase
    SA_PATH=YOUR_FIREBASE_SECRET_FILE_PATH
    BUCKET_NAME=YOUR_FIREBASE_BUCKET_NAME
    
    # jwt
    jwt_token=
  6. Choose either Option 1 or Option 2 to start up the server.

Option 1 - Using Go Directly
  1. Start backend service

    go mod download
    go mod tidy
    go run .
Option 2 - Using Docker
  1. build

     docker build -t 'pendown-be' .
  2. run

     docker run -p 8080:8080 pendown-be

After all this, you shall be able to visit http://localhost:8080/ in your browser, and it should display "404 page not found".

Unit Testing

Please check out our Backend repo to see the instructions for unit testing.

Acknowledgements

This documentation repository is based on FDS-docs published by @icheft.

Contributions

We truly are happy for and open to any sorts of contributions. It can be an issue or a PR. If you have any trouble using our sites, please don't hesitate to contact us. Thanks <3.

About

Official documentation for PenDown

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors