-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d15cfe8
Showing
28 changed files
with
3,469 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Trashure App, v. 1.0.0 | ||
## Team Project | ||
|
||
### [Try it now](https://heroku.... need to update) | ||
|
||
### Overview | ||
|
||
🏘 Are you moving out soon? | ||
🚚 Still have some stuff you love but not able to take with you? | ||
🎫 Have spare tickets fot tonight? | ||
Give it to someone for free! Share your Trashure! | ||
|
||
--- | ||
### Featutes | ||
|
||
* User can see on the map 🌏 any Trashure Items available in nearby area (user-geolocation feature is implemented) | ||
* User can sign up and login | ||
* Registered User can Reserve any available item | ||
* Registered User can Post Items | ||
* Registered User can see a list of Items (posted and reserved) | ||
|
||
--- | ||
|
||
### Technical Requirements | ||
|
||
🛠 To build the App the following technologies and tools were used: | ||
|
||
- HTML, CSS, JavaScript | ||
- PostgreSQL | ||
- Node.js | ||
- Express | ||
- middleware: pg, bcrypt, passport, express-session, method-overide, ejs | ||
- Heroku for deployment | ||
- version control system: Git | ||
- Whimsical for creating storyboards | ||
- Trello for keeping track of development | ||
|
||
--- | ||
## Trashure DB - ERD | ||
|
||
![ERD](/public/images/TrashureERD.jpg "Trashure ERD") | ||
|
||
--- | ||
|
||
## Challenges and next release Features | ||
|
||
One of the main challenges the Team faced with the project is being able to obtain information from a 3d party API, manipulatianig with geodata, storing these data in DB | ||
|
||
For Future releases some extra features can be added: | ||
|
||
- Search option so User can sort all available in DB items by certain criteria | ||
- Email notifications with details of reservation can be sent to the User who posted the Item and to the User who reserved the Item | ||
- Integrate third party API to improve UX uploading images (e.g. use Cloudinary) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const pg = require('pg'); | ||
|
||
let pool; | ||
|
||
if (process.env.PRODUCTION) { | ||
pool = new pg.Pool({ | ||
connectionString: process.env.DATABASE_URL, | ||
}) | ||
} else { | ||
pool = new pg.Pool({ | ||
database: 'trashure', | ||
user: 'debbiepaterson', | ||
password: 'hello' | ||
}) | ||
} | ||
|
||
module.exports = { | ||
query: (sql, params, callback) => { | ||
return pool.query(sql, params, callback) | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
convertDate: function convertDate(date) { | ||
var d = new Date(date), | ||
month = '' + (d.getMonth() + 1), | ||
day = '' + d.getDate(), | ||
year = d.getFullYear(); | ||
|
||
if (month.length < 2) | ||
month = '0' + month; | ||
if (day.length < 2) | ||
day = '0' + day; | ||
|
||
return [year, month, day].join('-'); | ||
} | ||
} | ||
|
||
// module.exports = { | ||
// convertDate: convertDate | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// substitute records array with the trashure db | ||
// var records = [ | ||
// { id: 1, username: 'jack', password: 'secret', displayName: 'Jack', emails: [ { value: '[email protected]' } ] } | ||
// , { id: 2, username: 'jill', password: 'birthday', displayName: 'Jill', emails: [ { value: '[email protected]' } ] } | ||
// ]; | ||
|
||
const db = require('./config') | ||
|
||
module.exports = { | ||
findByUsername: (username, cb) => { | ||
const records = db.query('select * from users;') | ||
process.nextTick(function() { | ||
for (var i = 0, len = records.length; i < len; i++) { | ||
var record = records[i]; | ||
if (record.username === username) { | ||
return cb(null, record); | ||
} | ||
} | ||
return cb(null, null); | ||
}); | ||
} | ||
} |
Oops, something went wrong.