-
Notifications
You must be signed in to change notification settings - Fork 0
File Structure
The following is an explanation for the file structure and directories that are used in the Foundry site.
For these directories, you can import files from them with these short names:
Short name | Directory |
---|---|
@components | src/components |
@images | src/images |
@pages | src/pages |
@styles | src/styles |
@utils | src/utils |
@app | src/components/App |
@Firebase | src/components/Firebase |
These can always be changed in the gatsby-node.js
file.
.
βββ functions # backend (firebase cloud functions)
βββ node_modules # modules
βββ src # source folder
βββ components # main components
βββ App # app components
βββ Firebase # firebase and auth logic
βββ Home # home components
βββ layouts
βββ Head.js # SEO and meta tags that go in the head
βββ index.js # layout file
βββ icons # collection of svg icons
βββ hero.js
βββ footer.js
βββ nav.js # navigation bar
βββ menu.js # sidebar menu for mobile
βββ serializeHyperlink.js
βββ images
βββ pages
βββ index.js
βββ 404.js
βββ styles # styled components styles
βββ utils # various tools for prismic and styling
βββ config.js # website info for SEO
βββ .gitignore
βββ .prettierrc
βββ gatsby-config.js # imports
βββ gatsby-browser.js # wrap page with layout
βββ gatsby-ssr.js # wrap page with layout
βββ LICENSE
βββ package-lock.json
βββ package.json
βββ README.md
The functions directory is the source code for Firebase Cloud Functions. This is the server backend code that is responsible for things like creating new user accounts, updating club credits, and verifying ReCaptcha tokens.
This is where the app's main components lie. If there is a file in this directory that doesn't have a folder, like the file Title.js
, this means the file is a global file or a higher-order component, that is used throughout the app.
This is where the components for the App lie. You will find all the components for any URL that starts with /app/
in this directory. The App directory should hold component logic (other than Firebase) specifically for the app side of the website.
This is an extremely important directory and the project is dependent upon it. The Firebase directory is where the FirebaseContext
is created that is used throughout the app. Any page you need a bit of Firebase in, you import from here.
Holds all the SVG icons that are used throughout the site
Holds the head metadata and layout wrapper for the entire website.
One of the most important directories. This folder holds reusable styles that are used throughout the website.
π The Foundry Β© 2020 | Created and designed by Kyrylo Orlov and Matthew Bilik.
Getting Started
Styling
Components