Code Monkey home page Code Monkey logo

framer-modules's Introduction


Development Discontinued

Please use the official Framer Store for new Framer X.



Framer Modules

Community-driven modules registry and manager for Framer

Download Framer Modules


✨ Discover

Looking for the right module used to be time-consuming and annoying—you didn't know if a module for the job exists, you weren't sure where to look for it and you had to manually download and move the files just to try things out.

Not anymore. Search for what you need and discover new useful modules without disrupting your workflow during prototyping. Not sure what's available? Try 'all'

Screenshot of listing the whole registry


⚡ Install

Tired of downloading and copying modules to the prototype on your own? We all are. That's why installing modules is now so easy even your grandma can do it. Seriously, it's just “press Enter”.

All modules ship with example code snippets. When you're not yet familiar with how a module works, press Cmd C and paste the code in Framer.

Found out you don't need the module anymore? Press Cmd Backspace and say bye (the latter is optional).

Please make sure your prototype is saved before installing a module.

Screenshot of 'Installed' tab


❤️ Save

Yes, it's true. You can now save your favorite or regularly used modules in presets and install them to the prototype in batch with one button. Making wireframe prototype? Install these. Doing VR? Install those. Anything you need.

Just press Cmd S on a selected module, add it to a preset or create new one and save even more time!

Screenshot of adding module to a preset


All the shortcuts you'll ever need

Action Shortcut
Open Framer Modules window Cmd ;
Switch between individual tabs Tab
Close the window Esc
Selected module
Install selected module return
Copy the code snippet for selected module Cmd C
Save the module to a preset Cmd S
Go to module's GitHub repository Cmd G
Remove module Cmd Backspace
Selected preset
Install modules from preset return
Delete preset Cmd Backspace
Edit preset modules Cmd E

It's what we make it. So let's make it great!

The “community-driven” part in the description is not just an empty phrase. This app is developed by the same people who are using it. If you are one of them (actually... us) and want to make our modules registry/manager even better, you're more than welcome to contribute.

This part of the docs will hopefully acquaint you with the inner workings of the whole system.

Architecture

Hosting the modules and module.json

Due to this project's open-source nature, the modules' management was designed to be as easy as possible and seamlessly integrated with other technologies available.

That's why there is no own server hosting the actual modules files. Instead, modules are hosted on GitHub and recognized by their module.json metadata file. Upon the installation, module files are pulled from the GitHub repository as specified in module.json and installed to the prototype.

That is why we don't need our own fileserver and why the Framer Modules registry is basically just a database holding modules' module.json files.

Modules Hosting Scheme

Hosting on GitHub also provides us the perks of not needing user accounts. When the module is published to the registry, it carries the information about the author in its repository link. This is enough to recognize the author and give them the permissions to update and overwrite. Publishing or updating a module with the same name from a different GitHub user is automatically rejected.

System Components & Technology stack

You can say the whole system consists of 3 major parts:

  • Framer Modules app — The main app for the designer that handles the prototype management
  • Server — Small server for communication with the modules registry
  • Modules Registry — Collection of modules metadata in database

Framer Modules Icon Framer Modules App

Is built on Electron and handles all actions related to prototype management. The app is split into two parts that communicate with each other using ipcMain and ipcRenderer modules from Electron.

Core

The main Electron process that is responsible for all 3 main types of actions being taken.

First is communication with the renderer process via ipc. Literally all methods for this are defined in self-titled Actions.js. Some methods also preprocess the responses before sending them back to renderer process, but otherwise they're pretty straightforward.

Second type of actions is HTTP requests. Although the requests are being used throughout the whole core and aren't defined at one place, they all use request package to make the calls. However, methods for making the requests to the Framer Modules server share many properties and thus are defined in ServerRequest.js.

And last but not least, the actions that actually handle the prototype are to be found in prototype-actions subdirectory. The functions are fed module.json (or an array of those) and prototype's path. Using request, they then pull the files from the corresponding GitHub repository as defined in the JSON and pipe them to the module-specific subfolder in prototype's modules directory.

If the un/installation is successful, the core will update prototype's app.coffee (by adding/removing require() statement) and framer/config.json (by recalculating folded code ranges). If any error occurs during the installation, the whole module gets removed.

Installed modules are also recognized by directory name and module.json inside. Any loose files or directories without module.json will result in “unmanaged” modules.

Interface

Interface is written with React and although we are not using any “single source of truth” state container, the state for the most of the app is stored within a single, highest-level, component. There are two components that have their own state, Splash and ModalWindow, and the reasons for those are pretty obvious in use.

Please note that because I couldn't get webpack to bundle ipcRenderer module from Electron, the methods for communication between the two processes are defined in the separate Action.js file loaded to the page via <script>.

To further inspect the React component structure, use electron-react-devtools. The package is installed as a dev dependency, you'll just need to require it in the app window's console.

Styles are written in Sass and split into individual files corresponding to React components. All SVG assets are Base64-encoded and saved as data URIs in _assets.sass file.

Server Icon Server

Small REST server for communication with the modules registry and data preprocessing. Separating this functionality from the app enables using the registry in more general ways.

The server is written in Express.js and uses Mongoose for easier data modeling, validation, etc.

Currently deployed on the Heroku Free Dyno. The source code for the server lies in its own repository.

Go to server's repository

Database Icon Modules Registry (Database)

Simple as it sounds. The database of choice is MongoDB and is currently deployed on the free MongoDB Atlas cluster. Data modeling of the collection is very straightforward and you will be able to to understand it from the Mongoose Schema in the server's source code or docs.

How it looks together?

System Architecture Blueprint

Design

The whole app is designed in Sketch and you can find the source file in resources folder in this repository.

WCAG and keyboard-first icons

Please comply to WCAG 2.0 Level AA. Although the app is supposed to be used by fairly small group of people, standard accessibility concepts will make the experience better for everyone. For color scheme checking, using Stark is recommended.

Since the app is most useful to the user in Framer Code view, it's designed to be mainly operated from the keyboard. Current design is heavily inspired by macOS Spotlight and Sketch Runner (which are both keyboard-first utilities) and you are welcome to redesign it from scratch if you have better design in mind. Please just make sure the app is always operable from the keyboard.

Related Repositories

Got questions about your contribution?

Open an issue | Send me an e-mail | Reach me on Messenger


Disclaimer

This is a third-party project and is not affiliated with Motif Tools BV.

License

MIT

framer-modules's People

Contributors

kysely 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

framer-modules's Issues

High-Sierra Ui bug

I've just updated to high sierra, unable to switch tabs, move the window or interact with the main panel.
screen shot 2017-12-21 at 10 53 53

Easy way to update a module?

Is there a better way to update a module other than removing it and installing it again? This method does not always install the updated version from github. Plus you'll encounter the the bug I've reported before (installing/removing a module undos your code), which is just...inexcusable.

The only way I can get it to work is to force quit Framer Modules (no way to quit????) through the activity Monitor and open the app again.

Cmd-; interferes with Adobe Illustrator

Using Cmd-; in Adobe Illustrator opens up Framer Modules instead. Please use a different shortcut or don't have Modules override shortcuts of the program that is currently focused on.

Can't uninstall Framer Modules

I dragged Framer Modules to trash because it was buggy and conflicting with Framer Studio's global shortcut for hiding layers in the design tab but it's still coming up when I press the shortcut key. How do I uninstall?

Thumbnail aspect ratio

Hello, thanks for creating this app. It's something which Framer has been missing for a long time.

I just pushed a module and the thumbnail looks very bad.

framer modules 2017-08-29 10-43-12

They should respect the aspect ratio.

Thanks for your contribution to the Framer world :)

Add versioning

Support a field for versioning! Allow module authors to manage the rest.

Unable to publish module

Love this app and was really excited to give it a try. Unfortunately, it's not working.

I've attached an image of the error alert. Please check my code here to see if I'm doing anything wrong!

screenshot 2017-08-28 16 40 28

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.