If you want to use the user's co-ordinates (longitude and latitude) to calculate the topocentric co-ordinates of an object to a not very high accuracy then you should be able to find a few software libraries (e.g. libnova) that do just that. Many use the algorithms from Jean Meeus' book Astronomical Algorithms. You can use catalogues such as the Bright Star Catalogue to find the equatorial co-ordinates of a star and then use the algorithms in this book to convert to topocentric co-ordinates (also called 'apparent place of a star').
Of course if you only want to calculate the 3D positions of stars, then it would be useless to use topocentric co-ordinates as the distances to the stars are so great that the error introduced by using geocentric (centre of the earth) instead of topocentric (position on earth) is very very small compared to the distance to the stars.
If you want to calculate the position of solar system object (planets, asteroids and comets) than you would need to be able to calculate the position of these objects to a very high precision. Meeus' book and software libraries derived from his book contain these algorithms. For planets you could use VSOP, but many software libraries include these. Meeus' book also includes algorithms to calculate the positions of the Moon and Pluto and the moons of the major planets. For asteroids and comets you can get the data needed for the algorithms from the IAU Minor Planet Center.
For high accuracy the algorithms provided in these libraries will not suffice and you may need to use professional software libraries such as NOVAS or SOFA. But then you are in milliarcsecond accuracy.