Coder Social home page Coder Social logo

oakleyaidan21 / clearforreddit Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 34.28 MB

A mobile reddit client for ios and android

TypeScript 49.74% JavaScript 45.36% Starlark 0.23% Java 2.64% Ruby 0.33% Objective-C 1.70%
android reddit ios mobile-app

clearforreddit's Introduction

Clear for Reddit

Clear is an open-sourced, cross-platform mobile application for browsing reddit.

So far, Clear is mostly contained to mass browsing, but features will be added as time goes on.

Setup

In order to run Clear yourself, you'll need to set it up like any other react-native application.

Android

Simply run npm install in the root directory

iOS

run npm install in the root directory, then run pod install in the ios directory

Creating a Reddit Application

For communicating with the reddit API, you'll need to create an application in your reddit account's preferences. Here's a link to doing so.

Once you have your apps userAgent, clientID, and refreshToken (helper here for retrieving that), put them each in a file within util/snoowrap titled snoowrapConfig.tsx. It should look like:

type Config = {
  userAgent: string;
  clientId: string;
  refreshToken: string;
};

const snoowrapConfig: Config = {
  userAgent: "USERAGENT", //a unique name for your app; you create this yourself
  clientId: "CLIENTID", //your clients id, found underneath the name of your application in your reddit account's app preferences
  refreshToken: "REFRESHTOKEN", //a refreshToken for creating a default account that unauthed users will use when they use the app without an account
};

export default snoowrapConfig;

Accessing imgur API

In order to get images from imgur in an album, you'll need to register for imgur api credentials. You can get those here. Select Anynymous usage without user authorization. Place your client id and client secret in util/imgur/ in a file called imgurConfig.tsx. It should look like this:

const imgurConfig: any = {
  clientID: "CLIENTID",
  clientSecret: "CLIENT SECRET",
};

export default imgurConfig;

Playing YouTube natively on Android

You'll need a google API key in order to play youtube videos in the app on android. You can find out how to get one here. Once you have a key, place it in util/youtube in a file titled youtubeConfig.tsx. It should look like this:

export const apiKey = "AIzaSyB56c605jONMlWRn0OzTTvLy6_p00Hgro4";

Current Features

  • sign users in
    • view subreddits and their posts
      • sort posts
    • view All/Popular posts
    • add/remove subscribed subreddits
    • view sub sidebars
    • save posts
    • view own user comments
  • search for posts or subs
  • view user pages
  • themeing (just light and dark)
  • imgur and gfycat integration
  • youtube integration
  • tablet version
  • can vote on posts

TO-DO (that I currently have thought of)

  • add ability to retrieve other sections of a user's page
  • add better UI
  • add comment/reply functionality
  • add report functionality
  • optimize post rendering
  • add swiper functionality to tablet version
  • add dynamic header to posts
  • improve styling
  • combine the two sorting types into one type

clearforreddit's People

Contributors

oakleyaidan21 avatar

Watchers

 avatar

clearforreddit's Issues

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.