Git Product home page Git Product logo

scrapbook's Introduction

Scrapbook helps you share the things you're working on every day! As a Hack Clubber, you are always learning and building things. Scrapbook allows you to share updates on the things you're doing with the rest of the Hack Club community, and keeps you motivated by recording each day you contribute, tallying that up onto a streak shown on your profile.

Scrapbook was made by the Hack Club community because many of us have found that showing up every day has been key to our success in learning. Even if we didnā€™t make something big or impressive, showing up consistently and making something was key.

How do I join?

Your Scrapbook is automatically generated for you when you make your first Scrapbook post. A post requires just two things: a description and an image. Scrapbook will take care of the rest. A post looks like this:

learned Express generator today - now back to a ton of (organized) files

Example pulled from audreyolafz's scrapbook

Posting from Slack (#scrapbook)

Hack Clubbers can also post from the Hack Club Slack. Once you've completed the onboarding flow in Slack and have access to all of the channels, join the #scrapbook channel. From here, Scrapbook posts are automatically generated for you when you post a message in the #scrapbook channel. As long as you use the same email for Slack and scrapbook.hackclub.com, the two will be synced up!

Here's how it would look on Slack to create a post:

Scrappy (the Slack Bot)

Scrappy, our handy dandy Slack bot, not only handles the automatic generation of things, but provides some helpful commands as well. These commands are also documented in our Slack if you send the message /scrappy in any channel.

Available commands
  • /scrappy-togglestreaks: toggles your streak count on/off in your status
  • /scrappy-togglestreaks all: opts out of streaks completely
  • /scrappy-open: opens your Scrapbook (or another user's if you specify a username)
  • /scrappy-setcss: adds a custom CSS file to your Scrapbook profile. Check out this cool example!
  • /scrappy-setdomain: links a custom domain to your Scrapbook profile, e.g. scrapbook.maggieliu.dev
  • /scrappy-setusername: change your profile username
  • /scrappy-setaudio: links an audio file to your Scrapbook. See an example here!
  • /scrappy-setwebhook: create a Scrappy Webhook we will make a blank fetch request to this URL every time you post
  • /scrappy-webring: adds or removes someone to your webring
  • Remove a post: delete the Slack message and Scrappy will automatically update for you
  • Edit a post: edit the Slack message and it will automatically update for you

Custom domains

To put your profile on your own domain, edit the field in your profile or run /scrappy setdomain <domain> in Slack, giving your websiteā€™s hostname (e.g. scrapbook.maggieliu.dev). Then, add a CNAME record on your DNS provider, pointed to cname.vercel-dns.com. If youā€™re curious how this works, itā€™s open source right here.

CSS customization

To customize the CSS on your profile page, edit the field in your profile or run /scrappy-setcss <link> in Slack, giving a link to a CSS file or a GitHub Gist. Hereā€™s the default CSS, for your overwriting pleasure.

Want to preview your CSS before adding it to your profile? Check out ā€™s Scrapbook Customizer.

If you are a beginner at coding and need a more in depth guide on how to work with CSS, check out @sampoderā€™s workshop on the topic, this covers different useful areas like CSS variables, fonts and making custom animations. You can access it from here.

Colors & fonts

If youā€™d like to change the page-wide fonts or colors, you can change yours with CSS Custom Properties. Hereā€™s the values the site uses by default:

:root {
  --colors-pink: #ff62dc;
  --colors-orange: #ff5b00;
  --colors-yellow: #f7ff00;
  --colors-green: #28ff00;
  --colors-cyan: #00ffff;
  --colors-blue: #00a4ff;
  --colors-purple: #c210ff;

  --colors-darker: #151613;
  --colors-dark: #20201d;
  --colors-darkless: #2b2b27;
  --colors-black: #1d201d;
  --colors-slate: #3b413a;
  --colors-muted: #777f76;
  --colors-smoke: #d5d8d5;
  --colors-snow: #f5f5f4;
  --colors-white: #ffffff;

  --fonts-body: 'Baloo 2', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  --fonts-display: 'Shrikhand', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  --fonts-mono: 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;
}

Some ā€œrelativeā€ colors use these colors for various components:

  • --colors-background ā€“ page background color
  • --colors-text ā€“ page text color
  • --colors-elevated ā€“ ā€œelevatedā€ content, like the posts
  • --colors-sunken ā€“ ā€œsunkenā€ content
  • --colors-progress ā€“ the color of the progress bar

Our dark mode is powered by prefers-color-scheme: dark.

Website widget

Want to showcase your streak on your personal website? Weā€™ve created a small widget that you can put on your website with two lines of code. It shows up in the bottom right corner. Just replace username with your Scrappy username. Hereā€™s the code snippet:

<script src="https://summer.hackclub.com/scrapbookwidget.js"></script>
<script>displayScrapbookUsername('username')</script>

If you have a custom domain, you can optionally link the scrapbook widget to it! Do it like this:

<script src="https://summer.hackclub.com/scrapbookwidget.js"></script>
<script>displayScrapbookUsername('username', 'https://scrapbook.example.com')</script>

RSS feed

Want to get an RSS feed of your Scrapbook posts? Just append .rss to the end of your Scrapbook profile's URL, like so: https://scrapbook.hackclub.com/(username).rss

macOS app

Hack Clubbers using a Mac can post directly from their menu bar using Scrapple, an app built by @LinusSkucas! From the menu bar, type in the update, select the attachments for the post and send it off into the interwebā€¦

You can download the app here, and check out the open source code here.

To install using Homebrew Cask:

brew tap LinusSkucas/homebrew-taps
brew install --cask scrapple

Public API

This site exposes a public JSON API powered by Next.js API routes. The live site runs entirely on this API.

Contributing

Contributions are encouraged and welcome! There are two GitHub repositories that contain code for Scrapbook: the Scrapbook website and Scrappy the Slack bot.

Development chatter happens in the #scrapbook-dev channel in the Hack Club Slack.

Running Locally

  1. Clone this repository
    • git clone https://github.com/hackclub/scrapbook.git && cd scrapbook
  2. Install dependencies
    • yarn
  3. Send a message mentioning @creds in Hack Club's Slack asking for the .env file
  4. Start server
    • yarn dev
  5. View your server
    • open http://localhost:3000/

Those with access to HQ's Vercel account can also generate their own .env file:

  1. Install Vercel's CLI (if you haven't already)
    • yarn global add vercel
  2. Link Vercel to your account for deployment
    • vercel
  3. Pull environment variables from Vercel
    • vercel pull

How does it all work underneath?

Behind the scenes, the site runs on Next.js, React.js, & SWR for data fetching. All pages are static-rendered, hosted on Vercel. Videos are hosted by Mux. The custom domains use a Vercel serverless function. The Slack integration runs on Express.js, hosted on Heroku. All the data is stored in a PostgreSQL database, fetched using Prisma.

The Origin of Scrapbook

Scrapbook was originally built in a week while preparing for the 2020 Summer of Making. To support makers, Hack Club distributed $50,000 in free electronics to 28 different countries. Scrapbook was made to help Hack Clubbers showcase the things they were doing during this event, but grew into a tool that the community uses every single day.


Hack Club, 2023. MIT License.

scrapbook's People

Contributors

adsay avatar alchzh avatar aramshiva avatar avi9664 avatar cedric-h avatar cjdenio avatar cytronicoder avatar dependabot[bot] avatar exu3 avatar faisalsayed10 avatar grymmy avatar jasonappah avatar javizaleta avatar jessicard avatar josiasaurel avatar kx-chen avatar lachlanjc avatar leomcelroy avatar maggie-j-liu avatar malted avatar matthewstanciu avatar maxwofford avatar samdev-7 avatar sampoder avatar thatrobotdev avatar zachlatta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scrapbook's Issues

New feature: projects overview page

I left a message in HQ an few weeks ago suggesting a new feature for scrapbook: A project-level overview of every user's project in scrapbook. Right now, scrapbook shows a feed of updates from each user. However, it's nothing more than that. I think it would be cool to have a page on scrapbook that has one post per user that has an image, title, and project description - like a portfolio of WIP SOM projects made by Hack Clubbers. This would be my first time contributing to the hc website so I'm laying out my plan below so you all can review it before I open a PR.

First, there would be a new page at /projects on the scrapbook which would have a similar layout to the homepage, except instead of a card for each update it would have a card for each user. I'm not yet sure how these would be sorted - perhaps randomly, or with users with the most recent posts first. Each card would consist of the project's title, the user's handle, a project description, and an optional project photo. Each card would link to the user's scrapbook page, as usual.

Each user's scrapbook page would also get the title and description of their project added to the top, below the streak chart and links.

Finally, there would be a new scrappy command /setproject <title | description | image> ... which users could use to change their project details. Users who don't set their project details will not be added to the portfolio.

I'm not familiar with Airtable but I'm guessing we would have to create a new table ProjectsTable which I could then access through airbridge using a new scrapbook API route.

So, does this sound good? Or is there anything I need to change or not do?

Like functionality

I think it'd be pretty cool if users could leave a like on a certain scrapbook page or item, from slack or in the web app itself! It'd be another degree of connection.

Fix timezones

Hello, on the website, the times are 5 hours behind for me. I am in the pacific timezone.

scrapbook escapes escapes

i just noticed this behavior on a post of mine from a month ago:

image

the <3 in the original post text is correctly normalized to &lt;3, but this is then wrongly further normalized to &amp;lt;3, which the browser does not parse as the original sequence anymore, leading to a broken caption.

0 Streak is a bit sad

Now some profiles have a streak of 0, this could be a bit demotivating, I think we should hide the streak if they got 0

Broken "About" link in nav

Something about upgrading to Next.js 9.5 seems to have broken the /about link in nav. I found that changing the link to /about/ appeared to fix this, but I'm worried that something else about route handling broke with 9.5 (and the two experimental features that were stabilized)

Leaving open for further investigation.

Add nprogress

On slow-loading pages like mentions, it feels like the site has gone unresponsive. Add nprogress & make its color customizable with user CSS.

@Home is detected as being a user

I know why this is happens, and I'm fairly certain it's expected. buuttttt... I had an idea. Sadly, I'm not sure how feasible it is or if it will make scrapbook very slow.

what if we fetched the /api/users/:username and if we get {"status":404,"error":"Cannot locate user"} we just disable the mention part

@lachlanjc thoughts? not sure if I explained that too well

Document newer API endpoints

Add a line to the About page & the README with the mentions endpoint & reaction endpoint (I think those are the only important ones missing?)

Double space in social card

Not sure if this is an issue with the social card generation or with the app Iā€™m using thatā€™s rendering the social text, but it looks like thereā€™s a double space in the meta description:

AF206F64-6A16-4211-B93B-51A9AFC70760

Profile Editing

Sam feel free to edit this text, my read is that creating profile editing and tools for scrapbook?

Please add me to this github organization

I am an undergraduate at PICT, Pune. A quality and output-driven computer enthusiast. Passionate about exploring computer science and technology-related topics. My domains & fields of interest are machine learning, data science, Computer Vision, Python, Java, C++, R, MATLAB, open-source. I aspire to work and contribute to these fields for betterment society through research and innovations for improvisation in the field of computer science and technology.

I have a keen interest in the research, especially in the domains of machine learning, AI, and data science. I have been a research fellow at The Emerging Tech Foundation. I have been a python mentor at Skillship foundation, a mentor at facebook's developer's circle. I have a keen interest in writing technical blogs and articles, worked at Geeksforgeeks.org as a technical content writer. Also currently I am an editor at PICT IEEE NewsletterGroup, which is a technical biannual magazine of my college. Also, I write technical blogs on medium.

I am even passionate about web-development. I have developed the official website of CTD 2020 (a technical event of PISB), also completed a couple of internships in this domain with Wikasta Technical Solutions and another with Kode IT Solutions. I am Technical Lead Developer at GirlScript Foundation Pune, here I manage all the tech issues and development of its official website.

I am a semifinalist of the national python codathon conducted by cisco and ISTE. I have been accepted as a Udacity scholar for the Microsoft Azure Machine Learning scholarship program. I am also an enthusiastic open source contributor, I am a Github's Arctic Code Vault Contributor.

Keen about exploring opportunities in the field of research and development in computer science-related technologies, also open for collaborations!

I would like to contribute in every possible way to this github organization! The concept of this github organization is what I loved the most! Please add me to this github organization as a member so that I can contribute and explore open source in much better way!

css not switching correctly from webring

When clicking on another user from the webring, the css doesn't change for the other users's profile. This is fixed upon page reload. For some pages only portions of the css change, suggesting that the css from the other user does load.

When clicking on user from webring:

image

Upon refresh:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.