Storygram is a place where photography enthusiasts can share their photos. It's about the admiration of one's work without the heavy emphasis on the social media aspect of it.
I've started this project out of dissatisfaction with the way social media handles photography. Too much of it is about likes, comments and followers. The art of photography gets lost in a sea of empty photos shared by millions.
Built with
In Storygram you've got complete control over how to display the uploaded user images through the Material UI grid system.
In the future, clicking on an image will load a dedicated story page of that specific image. Browsing through photos will be an experience instead of an overload of visual stimuli.
Storygram is a PWA which means it can also be added on mobile devices.
Grid container which centers all grid items inside.
<Grid container justify="center" >
Grid item with breakpoints for small, medium and large screens.
<Grid item xs={12} md={6} lg={4}>
Switch component inside routing to load up components and link to correct pages at App.js
<Router basename="/storygram">
<Switch>
<Route path="/signup" component={Signup} />
</Switch>
</Router>
You can Adjust the following values to alter the way the image grid is displayed at ImageGrid.js
return <Grid container justify="center" >
{/* All images */}
{docs && docs
// For every image
.map(image => (
// In a grid item
<Grid className="img-item" item key={image.id} xs={12} md={6} lg={4}>
{/* all accounts */}
{docs2 && docs2
// For every single image:
// Filter statament only contains the user of specific image
// https://medium.com/poka-techblog/simplify-your-javascript-use-map-reduce-and-filter-bd02c593cc2d
.filter((user) => image.userID === user.userID)
//Now you have the user that belongs to the image.ID
.map(user => (
<div>
<img src={image.url} alt="uploaded pic" />
<Typography variant="subtitle1"> By {user.userName} </Typography>
</div>
))}
</Grid>
))}
</Grid>
At authcontext.js you can see all the available database functions for the current logged in user.
//create user
function signup(email, password) {
return auth.createUserWithEmailAndPassword(email, password)
}
//login function
function login(email, password) {
return auth.signInWithEmailAndPassword(email, password)
}
- Navigate to the root folder of the project.
npm start
To start the project live server- Enjoy tinkering with the project!
Copyright (c) 2021 Furkan-rgb
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.